Skip to content

Commit

Permalink
fix test to use the default code's k8sVersionMinor
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Julian <me@joejulian.name>
  • Loading branch information
joejulian committed Jan 9, 2024
1 parent 869c1d2 commit 6e5332e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -104,7 +104,7 @@ test: test-unit
test-unit:
@echo
@echo "==> Running unit tests <=="
GO111MODULE=on go test $(GOFLAGS) -ldflags '$(LDFLAGS)' -run $(TESTS) $(PKG) $(TESTFLAGS)
GO111MODULE=on go test $(GOFLAGS) -run $(TESTS) $(PKG) $(TESTFLAGS)

.PHONY: test-coverage
test-coverage:
Expand Down
4 changes: 3 additions & 1 deletion cmd/helm/lint_test.go
Expand Up @@ -76,9 +76,11 @@ func TestLintCmdWithKubeVersionFlag(t *testing.T) {
golden: "output/lint-chart-with-deprecated-api-strict.txt",
wantError: true,
}, {
// the test builds will use the default k8sVersionMinor const in deprecations.go and capabilities.go
// which is "20"
name: "lint chart with deprecated api version without kube version",
cmd: fmt.Sprintf("lint %s", testChart),
golden: "output/lint-chart-with-deprecated-api.txt",
golden: "output/lint-chart-with-deprecated-api-old-k8s.txt",
wantError: false,
}, {
name: "lint chart with deprecated api version with older kube version",
Expand Down

0 comments on commit 6e5332e

Please sign in to comment.