Skip to content

Commit

Permalink
fix: update tests for loadSigners changes
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Swift <mikhail@testifysec.com>
  • Loading branch information
mikhailswift committed Feb 12, 2024
1 parent 7fef9cc commit e92de32
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func Test_loadSignersKeyPair(t *testing.T) {
},
}

signers, err := loadSigners(context.Background(), signerOptions, map[string]struct{}{"file": {}})
signers, err := loadSigners(context.Background(), signerOptions, options.KMSSignerProviderOptions{}, map[string]struct{}{"file": {}})
require.NoError(t, err)
require.Len(t, signers, 1)
assert.IsType(t, &cryptoutil.RSASigner{}, signers[0])
Expand All @@ -79,7 +79,7 @@ func Test_loadSignersKeyPair(t *testing.T) {
},
}

signers, err := loadSigners(context.Background(), signerOptions, map[string]struct{}{"file": {}})
signers, err := loadSigners(context.Background(), signerOptions, options.KMSSignerProviderOptions{}, map[string]struct{}{"file": {}})
require.Error(t, err)
require.Len(t, signers, 0)
})
Expand All @@ -99,7 +99,7 @@ func Test_loadSignersCertificate(t *testing.T) {
},
}

signers, err := loadSigners(context.Background(), signerOptions, map[string]struct{}{"file": {}})
signers, err := loadSigners(context.Background(), signerOptions, options.KMSSignerProviderOptions{}, map[string]struct{}{"file": {}})
require.NoError(t, err)
require.Len(t, signers, 1)
require.IsType(t, &cryptoutil.X509Signer{}, signers[0])
Expand Down
2 changes: 1 addition & 1 deletion cmd/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func Test_runRunRSACA(t *testing.T) {
},
}

signers, err := loadSigners(context.Background(), signerOptions, map[string]struct{}{"file": {}})
signers, err := loadSigners(context.Background(), signerOptions, options.KMSSignerProviderOptions{}, map[string]struct{}{"file": {}})
require.NoError(t, err)

workingDir := t.TempDir()
Expand Down
4 changes: 2 additions & 2 deletions cmd/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestRunVerifyCA(t *testing.T) {
},
}

signers, err := loadSigners(context.Background(), so, map[string]struct{}{"file": {}})
signers, err := loadSigners(context.Background(), so, options.KMSSignerProviderOptions{}, map[string]struct{}{"file": {}})
require.NoError(t, err)

caBytes, err := os.ReadFile(ca.Name())
Expand Down Expand Up @@ -167,7 +167,7 @@ func TestRunVerifyKeyPair(t *testing.T) {
},
}

signers, err := loadSigners(context.Background(), so, map[string]struct{}{"file": {}})
signers, err := loadSigners(context.Background(), so, options.KMSSignerProviderOptions{}, map[string]struct{}{"file": {}})
require.NoError(t, err)

artifactPath := filepath.Join(workingDir, "test.txt")
Expand Down

0 comments on commit e92de32

Please sign in to comment.