client: Move the weldrcheck integration tests to client
With this change the integration tests can now also be run as unit tests against the mocked server. The way it works is this: internal/client/unit_test.go sets up the mock server and is built when the `integration` build tag is *not* included. internal/client/integration_test.go sets up the connection to an existing server and is built when the `integration` build tag *is* included. The test code is built and run for both cases. Currently they all pass for the integration test run. The unit test cases need some work because the mocked server isn't a real server with real depsolving and package lists. A future commit will fix this.
This commit is contained in:
parent
816a09fd9d
commit
856eb59edf
9 changed files with 101 additions and 225 deletions
|
|
@ -77,7 +77,7 @@ 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-dnf-json-tests %{goipath}/cmd/osbuild-dnf-json-tests
|
||||
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-weldr-tests %{goipath}/internal/weldrcheck/
|
||||
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-rcm-tests %{goipath}/cmd/osbuild-rcm-tests
|
||||
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-image-tests %{goipath}/cmd/osbuild-image-tests
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue