Add some extra coverage.
This commit is contained in:
parent
6389100325
commit
56c3559e52
1 changed files with 10 additions and 0 deletions
|
@ -70,6 +70,13 @@ func createJWK(t *testing.T, pub crypto.PublicKey) *keyvault.JSONWebKey {
|
||||||
return key
|
return key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test_now(t *testing.T) {
|
||||||
|
t0 := now()
|
||||||
|
if loc := t0.Location(); loc != time.UTC {
|
||||||
|
t.Errorf("now() Location = %v, want %v", loc, time.UTC)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestNew(t *testing.T) {
|
func TestNew(t *testing.T) {
|
||||||
ctrl := gomock.NewController(t)
|
ctrl := gomock.NewController(t)
|
||||||
mockCreateClient(t, ctrl)
|
mockCreateClient(t, ctrl)
|
||||||
|
@ -439,6 +446,9 @@ func TestKeyVault_CreateSigner(t *testing.T) {
|
||||||
{"fail GetKey", fields{client}, args{&apiv1.CreateSignerRequest{
|
{"fail GetKey", fields{client}, args{&apiv1.CreateSignerRequest{
|
||||||
SigningKey: "azurekms:vault=my-vault;id=not-found;version=my-version",
|
SigningKey: "azurekms:vault=my-vault;id=not-found;version=my-version",
|
||||||
}}, nil, true},
|
}}, nil, true},
|
||||||
|
{"fail SigningKey", fields{client}, args{&apiv1.CreateSignerRequest{
|
||||||
|
SigningKey: "",
|
||||||
|
}}, nil, true},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue