Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests) use bats junit direct exporter to get rid of NodeJS and NPM #344

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ list: check-reqs
@set -x; make --silent show | jq -r '.target | path(.. | select(.platforms[] | contains("linux/$(ARCH)"))?) | add'

bats:
git clone https://github.com/bats-core/bats-core bats ;\
cd bats ;\
git checkout v1.7.0
git clone --branch v1.10.0 https://github.com/bats-core/bats-core bats

prepare-test: bats check-reqs
git submodule update --init --recursive
Expand All @@ -79,10 +77,7 @@ test-%: prepare-test
@make --silent build-$*
# Execute the test harness and write result to a TAP file
set -x
IMAGE=$* bats/bin/bats $(bats_flags) | tee target/results-$*.tap
# convert TAP to JUNIT
docker run --rm -v "$(CURDIR)":/usr/src/app -w /usr/src/app node:21.1.0-alpine3.18 \
sh -c "npm install -g [email protected] && npm install tap-xunit -g && cat target/results-$*.tap | tap-xunit --package='jenkinsci.docker.$*' > target/junit-results-$*.xml"
IMAGE=$* bats/bin/bats --formatter junit $(bats_flags) | tee target/junit-results-$*.xml

test: prepare-test
@make --silent list | while read image; do make --silent "test-$${image}"; done
80 changes: 0 additions & 80 deletions updatecli/updatecli.d/node.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions updatecli/updatecli.d/npm.yaml

This file was deleted.