Remove fakeclient and use testenv for flux cmd tests
Remove use of the fake client, and replace with a real client connected to the
testEnv.
This required fixes to the yaml files as the testEnv has stricter verifcation
of objects. This also meant it was not possible to test a GitRepository with
a missing artifact since that is not a valid state.
The tests are slower than before, taking around 7-10 seconds each because the
testEnv is setup and destroyed for every test. These will be sped up in a
follow up PR.
Signed-off-by:
Allen Porter <allen@thebends.org>
Showing
- cmd/flux/main.go 0 additions, 13 deletionscmd/flux/main.go
- cmd/flux/main_e2e_test.go 3 additions, 3 deletionscmd/flux/main_e2e_test.go
- cmd/flux/main_test.go 16 additions, 15 deletionscmd/flux/main_test.go
- cmd/flux/testdata/trace/deployment.yaml 28 additions, 1 deletioncmd/flux/testdata/trace/deployment.yaml
- cmd/flux/testdata/trace/helmrelease-missing-git-ref.txt 0 additions, 18 deletionscmd/flux/testdata/trace/helmrelease-missing-git-ref.txt
- cmd/flux/testdata/trace/helmrelease-missing-git-ref.yaml 0 additions, 73 deletionscmd/flux/testdata/trace/helmrelease-missing-git-ref.yaml
- cmd/flux/testdata/trace/helmrelease.yaml 16 additions, 1 deletioncmd/flux/testdata/trace/helmrelease.yaml
- cmd/flux/trace.go 1 addition, 1 deletioncmd/flux/trace.go
- cmd/flux/trace_test.go 3 additions, 14 deletionscmd/flux/trace_test.go
- cmd/flux/version_test.go 3 additions, 2 deletionscmd/flux/version_test.go
- internal/utils/utils.go 14 additions, 33 deletionsinternal/utils/utils.go
Loading
Please register or sign in to comment