diff --git a/server/src/__tests__/environment-routes.test.ts b/server/src/__tests__/environment-routes.test.ts index a97bca1a3d9..96bd15a5955 100644 --- a/server/src/__tests__/environment-routes.test.ts +++ b/server/src/__tests__/environment-routes.test.ts @@ -100,6 +100,7 @@ vi.mock("../services/secrets.js", () => ({ })); vi.mock("../services/environments.js", () => ({ + ACTIVE_CUSTOM_IMAGE_SETUP_STATUSES: ["starting", "waiting_for_user", "capturing"], environmentService: () => mockEnvironmentService, })); diff --git a/server/src/routes/environments.ts b/server/src/routes/environments.ts index 11521abb746..cf2247f8f6a 100644 --- a/server/src/routes/environments.ts +++ b/server/src/routes/environments.ts @@ -44,11 +44,14 @@ import { listReadyPluginEnvironmentDrivers } from "../services/plugin-environmen import { getConfiguredSecretProvider } from "../secrets/configured-provider.js"; import { assertBoardOrgAccess, getActorInfo } from "./authz.js"; import type { PluginWorkerManager } from "../services/plugin-worker-manager.js"; -import { environmentService } from "../services/environments.js"; +import { + ACTIVE_CUSTOM_IMAGE_SETUP_STATUSES, + environmentService, +} from "../services/environments.js"; import { environmentRuntimeService } from "../services/environment-runtime.js"; const ACTIVE_CUSTOM_IMAGE_SETUP_STATUSES_FOR_DELETE: ReadonlySet = - new Set(["starting", "waiting_for_user", "capturing"]); + new Set(ACTIVE_CUSTOM_IMAGE_SETUP_STATUSES); export function environmentRoutes( db: Db, diff --git a/server/src/services/environments.ts b/server/src/services/environments.ts index b696544b4ed..57092d68648 100644 --- a/server/src/services/environments.ts +++ b/server/src/services/environments.ts @@ -44,7 +44,7 @@ const DEFAULT_KUBERNETES_ENVIRONMENT_DESCRIPTION = const KUBERNETES_PROVIDER_KEY = "kubernetes"; /** Metadata marker for the company's managed-by-config Kubernetes sandbox environment. */ const KUBERNETES_MANAGED_MARKER = "managedKubernetesSandbox"; -const ACTIVE_CUSTOM_IMAGE_SETUP_STATUSES = ["starting", "waiting_for_user", "capturing"] as const; +export const ACTIVE_CUSTOM_IMAGE_SETUP_STATUSES = ["starting", "waiting_for_user", "capturing"] as const; /** * Configuration accepted by `ensureKubernetesEnvironment`. Mirrors the keys of