File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
enterprise/coderd/prebuilds Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -748,15 +748,19 @@ func TestSkippingHardLimitedPresets(t *testing.T) {
748
748
// Verify the final state after reconciliation.
749
749
workspaces , err = db .GetWorkspacesByTemplateID (ctx , template .ID )
750
750
require .NoError (t , err )
751
+ updatedPreset , err := db .GetPresetByID (ctx , preset .ID )
752
+ require .NoError (t , err )
751
753
752
754
if ! tc .isHardLimitHit {
753
755
// When hard limit is not reached, a new workspace should be created.
754
756
require .Equal (t , 2 , len (workspaces ))
757
+ require .Equal (t , database .PrebuildStatusHealthy , updatedPreset .PrebuildStatus )
755
758
return
756
759
}
757
760
758
761
// When hard limit is reached, no new workspace should be created.
759
762
require .Equal (t , 1 , len (workspaces ))
763
+ require .Equal (t , database .PrebuildStatusHardLimited , updatedPreset .PrebuildStatus )
760
764
761
765
// When hard limit is reached, a notification should be sent.
762
766
matching := fakeEnqueuer .Sent (func (notification * notificationstest.FakeNotification ) bool {
You can’t perform that action at this time.
0 commit comments