File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1557,6 +1557,28 @@ func (s *MethodTestSuite) TestTailnetFunctions() {
1557
1557
}))
1558
1558
}
1559
1559
1560
+ func (s * MethodTestSuite ) TestDBCrypt () {
1561
+ s .Run ("GetDBCryptKeys" , s .Subtest (func (db database.Store , check * expects ) {
1562
+ check .Args ().
1563
+ Asserts (rbac .ResourceSystem , rbac .ActionRead ).
1564
+ Returns ([]database.DBCryptKey {})
1565
+ }))
1566
+ s .Run ("InsertDBCryptKey" , s .Subtest (func (db database.Store , check * expects ) {
1567
+ check .Args (database.InsertDBCryptKeyParams {}).
1568
+ Asserts (rbac .ResourceSystem , rbac .ActionCreate ).
1569
+ Returns ()
1570
+ }))
1571
+ s .Run ("RevokeDBCryptKey" , s .Subtest (func (db database.Store , check * expects ) {
1572
+ err := db .InsertDBCryptKey (context .Background (), database.InsertDBCryptKeyParams {
1573
+ ActiveKeyDigest : "revoke me" ,
1574
+ })
1575
+ s .NoError (err )
1576
+ check .Args ("revoke me" ).
1577
+ Asserts (rbac .ResourceSystem , rbac .ActionUpdate ).
1578
+ Returns ()
1579
+ }))
1580
+ }
1581
+
1560
1582
func (s * MethodTestSuite ) TestSystemFunctions () {
1561
1583
s .Run ("UpdateUserLinkedID" , s .Subtest (func (db database.Store , check * expects ) {
1562
1584
u := dbgen .User (s .T (), db , database.User {})
You can’t perform that action at this time.
0 commit comments