Skip to content

Commit 6af9437

Browse files
committed
Rebase over master and a few more linter fixes
1 parent 18a648c commit 6af9437

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

cas/apiv1/services.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ func (t Type) String() string {
6060
}
6161

6262
// NotImplementedError is the type of error returned if an operation is not implemented.
63-
type NotImplementedError struct { //nolint:errname // ignore error name warning
64-
63+
type NotImplementedError struct {
6564
Message string
6665
}
6766

cas/apiv1/services_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestType_String(t *testing.T) {
2424
}
2525
}
2626

27-
func TestErrNotImplemented_Error(t *testing.T) {
27+
func TestNotImplementedError_Error(t *testing.T) {
2828
type fields struct {
2929
Message string
3030
}
@@ -38,17 +38,17 @@ func TestErrNotImplemented_Error(t *testing.T) {
3838
}
3939
for _, tt := range tests {
4040
t.Run(tt.name, func(t *testing.T) {
41-
e := ErrNotImplemented{
41+
e := NotImplementedError{
4242
Message: tt.fields.Message,
4343
}
4444
if got := e.Error(); got != tt.want {
45-
t.Errorf("ErrNotImplemented.Error() = %v, want %v", got, tt.want)
45+
t.Errorf("NotImplementedError.Error() = %v, want %v", got, tt.want)
4646
}
4747
})
4848
}
4949
}
5050

51-
func TestErrNotImplemented_StatusCode(t *testing.T) {
51+
func TestNotImplementedError_StatusCode(t *testing.T) {
5252
type fields struct {
5353
Message string
5454
}
@@ -62,11 +62,11 @@ func TestErrNotImplemented_StatusCode(t *testing.T) {
6262
}
6363
for _, tt := range tests {
6464
t.Run(tt.name, func(t *testing.T) {
65-
s := ErrNotImplemented{
65+
s := NotImplementedError{
6666
Message: tt.fields.Message,
6767
}
6868
if got := s.StatusCode(); got != tt.want {
69-
t.Errorf("ErrNotImplemented.StatusCode() = %v, want %v", got, tt.want)
69+
t.Errorf("NotImplementedError.StatusCode() = %v, want %v", got, tt.want)
7070
}
7171
})
7272
}

cas/stepcas/issuer_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import (
1515
type mockErrIssuer struct{}
1616

1717
func (m mockErrIssuer) SignToken(subject string, sans []string, info *raInfo) (string, error) {
18-
return "", apiv1.ErrNotImplemented{}
18+
return "", apiv1.NotImplementedError{}
1919
}
2020

2121
func (m mockErrIssuer) RevokeToken(subject string) (string, error) {
22-
return "", apiv1.ErrNotImplemented{}
22+
return "", apiv1.NotImplementedError{}
2323
}
2424

2525
func (m mockErrIssuer) Lifetime(d time.Duration) time.Duration {
@@ -29,7 +29,7 @@ func (m mockErrIssuer) Lifetime(d time.Duration) time.Duration {
2929
type mockErrSigner struct{}
3030

3131
func (s *mockErrSigner) Sign(payload []byte) (*jose.JSONWebSignature, error) {
32-
return nil, apiv1.ErrNotImplemented{}
32+
return nil, apiv1.NotImplementedError{}
3333
}
3434

3535
func (s *mockErrSigner) Options() jose.SignerOptions {

0 commit comments

Comments
 (0)