Skip to content

Commit

Permalink
fix: tests for kapp
Browse files Browse the repository at this point in the history
  • Loading branch information
nutellinoit authored and kriive committed Nov 14, 2024
1 parent f3b8ed5 commit 6a7269c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions internal/dependencies/tools/test_data/kapp/0.61.0/kapp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

cat <<EOF
kapp version 0.61.0
Succeeded
EOF
7 changes: 7 additions & 0 deletions internal/dependencies/tools/test_data/kapp/0.62.0/kapp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

cat <<EOF
kapp version 0.62.0
Succeeded
EOF
7 changes: 7 additions & 0 deletions internal/dependencies/tools/tool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ func TestHelperProcess(t *testing.T) {
case "version":
fmt.Fprintf(os.Stdout, "v0.156.0")
}
case "kapp":
switch subcmd {
case "version":
fmt.Fprintf(os.Stdout, "kapp version 0.62.0\n"+
"\n"+
"Succeeded\n")
}
default:
fmt.Fprintf(os.Stdout, "command not found")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/dependencies/tools/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func Test_Validator_Validate(t *testing.T) {
errors.New("yq: wrong tool version - installed = 4.34.1, expected = 4.33.0"),
errors.New("helm: wrong tool version - installed = 3.12.3, expected = 3.11.3"),
errors.New("helmfile: wrong tool version - installed = 0.156.0, expected = 0.155.0"),
errors.New("kapp: wrong tool version - installed = 0.61.0, expected = 0.62.0"),
errors.New("kapp: wrong tool version - installed = 0.62.0, expected = 0.61.0"),
},
},
{
Expand Down

0 comments on commit 6a7269c

Please sign in to comment.