Skip to content

Commit 9af7cb5

Browse files
committed
fix: fix tests
1 parent b9b7a14 commit 9af7cb5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

coderd/database/querier_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2955,8 +2955,11 @@ func TestOrganizationDeleteTrigger(t *testing.T) {
29552955

29562956
orgA := dbfake.Organization(t, db).Do()
29572957

2958+
user := dbgen.User(t, db, database.User{})
2959+
29582960
dbgen.Template(t, db, database.Template{
29592961
OrganizationID: orgA.Org.ID,
2962+
CreatedBy: user.ID,
29602963
})
29612964

29622965
ctx := testutil.Context(t, testutil.WaitShort)
@@ -2989,7 +2992,7 @@ func TestOrganizationDeleteTrigger(t *testing.T) {
29892992
require.Error(t, err)
29902993
// cannot delete organization: organization has 1 provisioner keys that must be deleted first
29912994
require.ErrorContains(t, err, "cannot delete organization")
2992-
require.ErrorContains(t, err, "has 1 provisioner keys")
2995+
require.ErrorContains(t, err, "1 provisioner keys")
29932996
})
29942997

29952998
t.Run("GroupExists", func(t *testing.T) {
@@ -3019,8 +3022,11 @@ func TestOrganizationDeleteTrigger(t *testing.T) {
30193022

30203023
orgA := dbfake.Organization(t, db).Do()
30213024

3025+
user := dbgen.User(t, db, database.User{})
3026+
30223027
dbgen.OrganizationMember(t, db, database.OrganizationMember{
30233028
OrganizationID: orgA.Org.ID,
3029+
UserID: user.ID,
30243030
})
30253031

30263032
ctx := testutil.Context(t, testutil.WaitShort)

0 commit comments

Comments
 (0)