Fix tests
Some checks failed
Deploy PR / check_pr (push) Has been cancelled
Deploy PR / get_info (push) Has been cancelled
Deploy PR / comment-pr (push) Has been cancelled
Deploy PR / build (push) Has been cancelled
Deploy PR / deploy (push) Has been cancelled

Signed-off-by: Danny Kopping <dannykopping@gmail.com>
This commit is contained in:
Danny Kopping
2025-03-04 10:58:19 +00:00
parent 5d2fea5cd7
commit 431ceceee1
2 changed files with 5 additions and 5 deletions

View File

@ -104,7 +104,7 @@ func TestClaimPrebuild(t *testing.T) {
ctx = dbauthz.AsSystemRestricted(ctx)
// Given: a reconciliation completes.
controller.Reconcile(ctx, nil)
require.NoError(t, controller.ReconcileAll(ctx))
// Given: a set of running, eligible prebuilds eventually starts up.
runningPrebuilds := make(map[uuid.UUID]database.GetRunningPrebuildsRow, desiredInstances*presetCount)

View File

@ -53,7 +53,7 @@ func TestNoReconciliationActionsIfNoPresets(t *testing.T) {
require.Equal(t, templateVersion, gotTemplateVersion)
// when we trigger the reconciliation loop for all templates
controller.Reconcile(ctx, nil)
require.NoError(t, controller.ReconcileAll(ctx))
// then no reconciliation actions are taken
// because without presets, there are no prebuilds
@ -109,7 +109,7 @@ func TestNoReconciliationActionsIfNoPrebuilds(t *testing.T) {
require.NotEmpty(t, presetParameters)
// when we trigger the reconciliation loop for all templates
controller.Reconcile(ctx, nil)
require.NoError(t, controller.ReconcileAll(ctx))
// then no reconciliation actions are taken
// because without prebuilds, there is nothing to reconcile
@ -316,7 +316,7 @@ func TestActiveTemplateVersionPrebuilds(t *testing.T) {
templateID,
)
controller.Reconcile(ctx, nil)
require.NoError(t, controller.ReconcileAll(ctx))
createdNewPrebuild := false
deletedOldPrebuild := true
@ -365,7 +365,7 @@ func TestInactiveTemplateVersionPrebuilds(t *testing.T) {
// * a third is not running because its latest build was a start transition but the build failed
// * a fourth is not running because its latest build was a start transition but the build was canceled
// when we trigger the reconciliation loop for all templates
controller.Reconcile(ctx, nil)
require.NoError(t, controller.ReconcileAll(ctx))
// then the four non running prebuilds are deleted
// and 1 of the running prebuilds is deleted
// because stopped, deleted and failed builds are not considered running in terms of the definition of "running" above.