File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 4
4
"context"
5
5
6
6
"golang.org/x/xerrors"
7
+
8
+ "github.com/coder/coder/v2/coderd/database"
7
9
)
8
10
9
11
var ErrKeyNotFound = xerrors .New ("key not found" )
@@ -12,6 +14,6 @@ var ErrKeyInvalid = xerrors.New("key is invalid for use")
12
14
13
15
// Keycache provides an abstraction for fetching signing keys.
14
16
type Keycache interface {
15
- Latest (ctx context.Context ) ([] byte , error )
16
- Version (ctx context.Context , sequence int32 ) ([] byte , error )
17
+ Latest (ctx context.Context ) (database. CryptoKey , error )
18
+ Version (ctx context.Context , sequence int32 ) (database. CryptoKey , error )
17
19
}
Original file line number Diff line number Diff line change @@ -2302,6 +2302,10 @@ func (s *MethodTestSuite) TestCryptoKeys() {
2302
2302
DeletesAt : sql.NullTime {Time : time .Now (), Valid : true },
2303
2303
}).Asserts (rbac .ResourceCryptoKey , policy .ActionUpdate )
2304
2304
}))
2305
+ s .Run ("GetCryptoKeysByFeature" , s .Subtest (func (db database.Store , check * expects ) {
2306
+ check .Args (database .CryptoKeyFeatureWorkspaceApps ).
2307
+ Asserts (rbac .ResourceCryptoKey , policy .ActionRead )
2308
+ }))
2305
2309
}
2306
2310
2307
2311
func (s * MethodTestSuite ) TestSystemFunctions () {
You can’t perform that action at this time.
0 commit comments