diff --git a/.gitignore b/.gitignore index 94a1b559b..a85cc829a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ __pycache__ /osbuild-upload-azure /osbuild-upload-aws /osbuild-dnf-json-tests -/osbuild-tests +/osbuild-composer-cli-tests /osbuild-weldr-tests /osbuild-composer-cloud /osbuild-composer-cloud-tests diff --git a/Makefile b/Makefile index b92ca985c..f7c31e354 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ build: go build -o osbuild-pipeline ./cmd/osbuild-pipeline/ go build -o osbuild-upload-azure ./cmd/osbuild-upload-azure/ go build -o osbuild-upload-aws ./cmd/osbuild-upload-aws/ - go test -c -tags=integration -o osbuild-tests ./cmd/osbuild-tests/main_test.go + go test -c -tags=integration -o osbuild-composer-cli-tests ./cmd/osbuild-composer-cli-tests/main_test.go go test -c -tags=integration -o osbuild-weldr-tests ./internal/client/ go test -c -tags=integration -o osbuild-dnf-json-tests ./cmd/osbuild-dnf-json-tests/main_test.go go test -c -tags=integration -o osbuild-image-tests ./cmd/osbuild-image-tests/ diff --git a/cmd/osbuild-tests/main_test.go b/cmd/osbuild-composer-cli-tests/main_test.go similarity index 100% rename from cmd/osbuild-tests/main_test.go rename to cmd/osbuild-composer-cli-tests/main_test.go diff --git a/golang-github-osbuild-composer.spec b/golang-github-osbuild-composer.spec index 0112bcb81..d6a072cea 100644 --- a/golang-github-osbuild-composer.spec +++ b/golang-github-osbuild-composer.spec @@ -92,7 +92,7 @@ export GOPATH=%{gobuilddir}:%{gopath} TEST_LDFLAGS="${LDFLAGS:-} -B 0x$(od -N 20 -An -tx1 -w100 /dev/urandom | tr -d ' ')" -go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-tests %{goipath}/cmd/osbuild-tests +go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-cli-tests %{goipath}/cmd/osbuild-composer-cli-tests go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-dnf-json-tests %{goipath}/cmd/osbuild-dnf-json-tests go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-weldr-tests %{goipath}/internal/client/ go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-image-tests %{goipath}/cmd/osbuild-image-tests @@ -116,7 +116,7 @@ install -m 0644 -vp distribution/osbuild-composer.conf %{buildroot}%{_sysus install -m 0755 -vd %{buildroot}%{_localstatedir}/cache/osbuild-composer/dnf-cache install -m 0755 -vd %{buildroot}%{_libexecdir}/tests/osbuild-composer -install -m 0755 -vp _bin/osbuild-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ +install -m 0755 -vp _bin/osbuild-composer-cli-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ install -m 0755 -vp _bin/osbuild-weldr-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ install -m 0755 -vp _bin/osbuild-dnf-json-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ install -m 0755 -vp _bin/osbuild-image-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ diff --git a/osbuild-composer.spec b/osbuild-composer.spec index ce1372f7e..773d7bb3d 100644 --- a/osbuild-composer.spec +++ b/osbuild-composer.spec @@ -113,7 +113,7 @@ export GOPATH=%{gobuilddir}:%{gopath} TEST_LDFLAGS="${LDFLAGS:-} -B 0x$(od -N 20 -An -tx1 -w100 /dev/urandom | tr -d ' ')" -go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-tests %{goipath}/cmd/osbuild-tests +go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-cli-tests %{goipath}/cmd/osbuild-composer-cli-tests go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-dnf-json-tests %{goipath}/cmd/osbuild-dnf-json-tests go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-weldr-tests %{goipath}/internal/client/ go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-image-tests %{goipath}/cmd/osbuild-image-tests @@ -153,7 +153,7 @@ install -m 0644 -vp distribution/osbuild-composer-cloud.{service,socket} %{build %if %{with tests} || 0%{?rhel} install -m 0755 -vd %{buildroot}%{_libexecdir}/tests/osbuild-composer -install -m 0755 -vp _bin/osbuild-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ +install -m 0755 -vp _bin/osbuild-composer-cli-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ install -m 0755 -vp _bin/osbuild-weldr-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ install -m 0755 -vp _bin/osbuild-dnf-json-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ install -m 0755 -vp _bin/osbuild-image-tests %{buildroot}%{_libexecdir}/tests/osbuild-composer/ diff --git a/schutzbot/run_base_tests.sh b/schutzbot/run_base_tests.sh index 553ccfb45..ca62012bb 100755 --- a/schutzbot/run_base_tests.sh +++ b/schutzbot/run_base_tests.sh @@ -10,7 +10,7 @@ FAILED_TESTS=() TEST_CASES=( "osbuild-weldr-tests" "osbuild-dnf-json-tests" - "osbuild-tests" + "osbuild-composer-cli-tests" "osbuild-auth-tests" ) diff --git a/test/README.md b/test/README.md index bd47265fd..1de9bb089 100644 --- a/test/README.md +++ b/test/README.md @@ -150,7 +150,8 @@ tests, see `.github/workflows/tests.yml`. ## Integration testing This will consume the osbuild-composer API surface via the `composer-cli` -command line interface. Implementation is under `cmd/osbuild-tests/`. +command line interface. Implementation is under +`cmd/osbuild-composer-cli-tests/`. The easiest way to get started with integration testing from a git checkout is: @@ -161,8 +162,10 @@ checkout is: * `dnf install rpmbuild/RPMS/x86_64/osbuild-composer-*.rpm` - this will install both osbuild-composer, its -debuginfo, -debugsource and -tests packages * `systemctl start osbuild-composer` -* `/usr/libexec/tests/osbuild-composer/osbuild-tests` to execute the test suite. - It is best that you use a fresh system for installing and running the tests! +* `/usr/libexec/tests/osbuild-composer/osbuild-composer-cli-tests` to execute + the test suite. + +It is best that you use a fresh system for installing and running the tests! **NOTE:** @@ -174,4 +177,4 @@ If you are working on a pull request that adds more integration tests from the local directory without installing it: * `make build` - will build everything under `cmd/` -* `./osbuild-tests` - will execute the freshly built integration test suite +* `./osbuild-composer-cli-tests` - will execute the freshly built integration test suite