Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
Yongxuanzhang committed Sep 27, 2022
1 parent af300fd commit 347b499
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions pkg/reconciler/trustedresources/sign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,40 +100,6 @@ func TestSignInterface(t *testing.T) {
}
}

func TestGenerateKeyFile(t *testing.T) {
tmpDir := t.TempDir()

tcs := []struct {
name string
dir string
password string
wantErr bool
}{{
name: "Generate key files",
dir: tmpDir,
password: password,
wantErr: false,
}, {
name: "Empty directory",
dir: "",
password: password,
wantErr: false,
}, {
name: "Empty password",
dir: tmpDir,
password: "",
wantErr: false,
}}

for _, tc := range tcs {
t.Run(tc.name, func(t *testing.T) {
if _, _, err := generateKeyFile(tmpDir, pass(tc.password)); (err != nil) != tc.wantErr {
t.Fatalf("GenerateKeyFile() get err %v, wantErr %t", err, tc.wantErr)
}
})
}
}

type mockSigner struct {
signature.SignerVerifier
}
Expand Down

0 comments on commit 347b499

Please sign in to comment.