Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit875cc0d

Browse files
committed
fix some tests
1 parent7ccb2c4 commit875cc0d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

‎coderd/database/dbauthz/dbauthz_test.go‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4532,7 +4532,14 @@ func (s *MethodTestSuite) TestSystemFunctions() {
45324532
check.Args(true).Asserts(rbac.ResourceDeploymentConfig,policy.ActionUpdate)
45334533
}))
45344534
s.Run("GetNotificationVAPIDKeys",s.Subtest(func(db database.Store,check*expects) {
4535-
check.Args().Asserts(rbac.ResourceDeploymentConfig,policy.ActionRead).Errors(sql.ErrNoRows)
4535+
require.NoError(s.T(),db.UpsertNotificationVAPIDKeys(context.Background(), database.UpsertNotificationVAPIDKeysParams{
4536+
VapidPublicKey:"test",
4537+
VapidPrivateKey:"test",
4538+
}))
4539+
check.Args().Asserts(rbac.ResourceDeploymentConfig,policy.ActionRead).Returns(database.GetNotificationVAPIDKeysRow{
4540+
VapidPublicKey:"test",
4541+
VapidPrivateKey:"test",
4542+
})
45364543
}))
45374544
s.Run("UpsertNotificationVAPIDKeys",s.Subtest(func(db database.Store,check*expects) {
45384545
check.Args(database.UpsertNotificationVAPIDKeysParams{
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- VAPID keys lited from coderd/notifications_test.go.
2+
INSERT INTO notification_push_subscriptions (id, user_id, created_at, endpoint, endpoint_p256dh_key, endpoint_auth_key)VALUES (gen_random_uuid(), (SELECT idFROM usersLIMIT1), NOW(),'https://example.com','BNNL5ZaTfK81qhXOx23+wewhigUeFb632jN6LvRWCFH1ubQr77FE/9qV1FuojuRmHP42zmf34rXgW80OvUVDgTk=','zqbxT6JKstKSY9JKibZLSQ==');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp