We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent831f3e9 commit78e0f42Copy full SHA for 78e0f42
enterprise/coderd/prebuilds/reconcile_test.go
@@ -718,16 +718,20 @@ func TestSkippingHardLimitedPresets(t *testing.T) {
718
clock.Advance(time.Second).MustWait(ctx)
719
720
// 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.
724
require.NoError(t,controller.ReconcileAll(ctx))
725
-// Make we didn't try to create 2nd workspace, because we hit hard limit before.
726
workspaces,err=db.GetWorkspacesByTemplateID(ctx,template.ID)
727
require.NoError(t,err)
728
729
iftc.isHardLimitHit {
730
+// We didn't try to create 2nd workspace, because we hit hard limit before.
731
workspaceCount=len(workspaces)
732
require.Equal(t,1,workspaceCount)
733
}else {
734
+// We created 2nd workspace, hard limit wasn't hit.
735
736
require.Equal(t,2,workspaceCount)
737
}