tests: rename composer-cli tests

These had the generic name osbulid-tests, rename the binary to more
closely describe what is under test: weldr API as composed by
composer-cli.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-09-25 01:21:08 +01:00 committed by Ondřej Budai
parent 678de9d1ef
commit 9d18c3bfa2
7 changed files with 14 additions and 11 deletions

2
.gitignore vendored
View file

@ -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

View file

@ -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/

View file

@ -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/

View file

@ -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/

View file

@ -10,7 +10,7 @@ FAILED_TESTS=()
TEST_CASES=(
"osbuild-weldr-tests"
"osbuild-dnf-json-tests"
"osbuild-tests"
"osbuild-composer-cli-tests"
"osbuild-auth-tests"
)

View file

@ -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