Commit Graph

4 Commits

Author SHA1 Message Date
Ashley Davis
93f868b3bc
move versionchecker tests to test/integration
Since this test requires setup before it can successfully run,
we define it as an integration test and move it here so that on a
fresh checkout a user can always run `go test ./pkg/...` and expect that
it would succeed.

Also involves:

- Exporting the VersionChecker and adding NewWithConfig to enable
  testing
- Some comment changes
- A change to the type returned by New(); see
  https://github.com/golang/go/wiki/CodeReviewComments#interfaces

Ideally I'd not add `NewFromClient` but I think it's the most minimal
change and is preferable to publicly exporting `VersionChecker.client`.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-01-12 14:21:53 +00:00
Inteon
85710579dd
Apply suggestions from code review
Co-authored-by: Richard Wall <wallrj@users.noreply.github.com>
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-30 17:00:27 +02:00
Inteon
644db10b92
don't early-stop, instead return all versions
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-29 15:06:31 +02:00
Inteon
6545064fcf
align flags and behaviour to 'kubectl version'
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-27 18:02:21 +02:00