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

Commit78e0f42

Browse files
test: improve tests
1 parent831f3e9 commit78e0f42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎enterprise/coderd/prebuilds/reconcile_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,16 +718,20 @@ func TestSkippingHardLimitedPresets(t *testing.T) {
718718
clock.Advance(time.Second).MustWait(ctx)
719719

720720
// ReconcileAll won't have any effect because we hit hard limit.
721+
722+
// ReconcileAll tries to create 1 desired instance, because previous build is failed.
723+
// But it maybe hard-limited depending on test configuration.
721724
require.NoError(t,controller.ReconcileAll(ctx))
722725

723-
// Make we didn't try to create 2nd workspace, because we hit hard limit before.
724726
workspaces,err=db.GetWorkspacesByTemplateID(ctx,template.ID)
725727
require.NoError(t,err)
726728

727729
iftc.isHardLimitHit {
730+
// We didn't try to create 2nd workspace, because we hit hard limit before.
728731
workspaceCount=len(workspaces)
729732
require.Equal(t,1,workspaceCount)
730733
}else {
734+
// We created 2nd workspace, hard limit wasn't hit.
731735
workspaceCount=len(workspaces)
732736
require.Equal(t,2,workspaceCount)
733737
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp