diff --git a/authority/authorize_test.go b/authority/authorize_test.go index 087318be..b221d0de 100644 --- a/authority/authorize_test.go +++ b/authority/authorize_test.go @@ -1034,7 +1034,7 @@ func TestAuthority_authorizeSSHSign(t *testing.T) { } } else { if assert.Nil(t, tc.err) { - assert.Len(t, 8, got) // number of provisioner.SignOptions returned + assert.Len(t, 9, got) // number of provisioner.SignOptions returned } } }) diff --git a/authority/provisioner/aws_test.go b/authority/provisioner/aws_test.go index 0d9b5d4d..d12d0626 100644 --- a/authority/provisioner/aws_test.go +++ b/authority/provisioner/aws_test.go @@ -813,7 +813,6 @@ func TestAWS_AuthorizeSSHSign(t *testing.T) { } else if assert.NotNil(t, got) { cert, err := signSSHCertificate(tt.args.key, tt.args.sshOpts, got, signer.Key.(crypto.Signer)) if (err != nil) != tt.wantSignErr { - t.Errorf("SignSSH error = %v, wantSignErr %v", err, tt.wantSignErr) } else { if tt.wantSignErr { diff --git a/authority/provisioner/k8sSA_test.go b/authority/provisioner/k8sSA_test.go index 1eff379d..2458babb 100644 --- a/authority/provisioner/k8sSA_test.go +++ b/authority/provisioner/k8sSA_test.go @@ -368,9 +368,10 @@ func TestK8sSA_AuthorizeSSHSign(t *testing.T) { } else { if assert.Nil(t, tc.err) { if assert.NotNil(t, opts) { - assert.Len(t, 7, opts) + assert.Len(t, 8, opts) for _, o := range opts { switch v := o.(type) { + case Interface: case sshCertificateOptionsFunc: case *sshCertOptionsRequireValidator: assert.Equals(t, v, &sshCertOptionsRequireValidator{CertType: true, KeyID: true, Principals: true}) diff --git a/authority/provisioner/ssh_test.go b/authority/provisioner/ssh_test.go index c530cd3c..90271443 100644 --- a/authority/provisioner/ssh_test.go +++ b/authority/provisioner/ssh_test.go @@ -53,6 +53,7 @@ func signSSHCertificate(key crypto.PublicKey, opts SignSSHOptions, signOpts []Si for _, op := range signOpts { switch o := op.(type) { + case Interface: // add options to NewCertificate case SSHCertificateOptions: certOptions = append(certOptions, o.Options(opts)...) diff --git a/authority/provisioner/x5c_test.go b/authority/provisioner/x5c_test.go index f28fcc7c..3bcf30d1 100644 --- a/authority/provisioner/x5c_test.go +++ b/authority/provisioner/x5c_test.go @@ -769,6 +769,7 @@ func TestX5C_AuthorizeSSHSign(t *testing.T) { nw := now() for _, o := range opts { switch v := o.(type) { + case Interface: case sshCertOptionsValidator: tc.claims.Step.SSH.ValidAfter.t = time.Time{} tc.claims.Step.SSH.ValidBefore.t = time.Time{} @@ -799,9 +800,9 @@ func TestX5C_AuthorizeSSHSign(t *testing.T) { tot++ } if len(tc.claims.Step.SSH.CertType) > 0 { - assert.Equals(t, tot, 10) + assert.Equals(t, tot, 11) } else { - assert.Equals(t, tot, 8) + assert.Equals(t, tot, 9) } } }