Skip to content

Commit

Permalink
chore: test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ericzzzzzzz committed Apr 24, 2024
1 parent 096b34d commit 3901f1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func main() {
flag.StringVar(&opts.Images.ShellImage, "shell-image", "", "The container image containing a shell")
flag.StringVar(&opts.Images.ShellImageWin, "shell-image-win", "", "The container image containing a windows shell")
flag.StringVar(&opts.Images.WorkingDirInitImage, "workingdirinit-image", "", "The container image containing our working dir init binary.")

// This parses flags.
cfg := injection.ParseAndGetRESTConfigOrDie()

Expand Down
6 changes: 3 additions & 3 deletions pkg/entrypoint/entrypointer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ func TestReadArtifactsFileDoesNotExist(t *testing.T) {
t.Run("readArtifact file doesn't exist, empty result, no error.", func(t *testing.T) {
dir := createTmpDir(t, "")
fp := filepath.Join(dir, "provenance.json")
got, err := readArtifacts(fp, 0)
got, err := readArtifacts(fp, result.StepArtifactsResultType)

if err != nil {
t.Fatalf("Did not expect and error but got: %v", err)
Expand All @@ -1131,7 +1131,7 @@ func TestReadArtifactsFileExistNoError(t *testing.T) {
if err != nil {
t.Fatalf("Did not expect and error but got: %v", err)
}
got, err := readArtifacts(fp, 0)
got, err := readArtifacts(fp, result.StepArtifactsResultType)

if err != nil {
t.Fatalf("Did not expect and error but got: %v", err)
Expand All @@ -1155,7 +1155,7 @@ func TestReadArtifactsFileExistReadError(t *testing.T) {
if err != nil {
t.Fatalf("Did not expect and error but got: %v", err)
}
got, err := readArtifacts(fp, 0)
got, err := readArtifacts(fp, result.StepArtifactsResultType)

if err == nil {
t.Fatalf("expecting error but got nil")
Expand Down

0 comments on commit 3901f1f

Please sign in to comment.