| 1 | import * as AWS from "@/AWS"; |
| 2 | import * as Kubernetes from "@/Kubernetes"; |
| 3 | import * as Provider from "@/Provider"; |
| 4 | import * as Test from "@/Test/Alchemy"; |
| 5 | import { expect } from "alchemy-test"; |
| 6 | import * as Effect from "effect/Effect"; |
| 7 | import * as Layer from "effect/Layer"; |
| 8 | |
| 9 | const testOptions = { |
| 10 | providers: Layer.mergeAll(AWS.providers(), Kubernetes.providers()), |
| 11 | }; |
| 12 | const { test } = Test.make(testOptions); |
| 13 | |
| 14 | // Ungated probe: `Job` is a composite host (in-cluster batch/v1 Job or |
| 15 | // CronJob plus adapter-owned cloud resources on managed clusters) with no |
| 16 | // faithful single-API enumeration, so `list()` is intentionally empty. The |
| 17 | // probe proves the provider is registered and its record type-checks |
| 18 | // without paying the ~15-minute EKS control-plane create. Full lifecycle |
| 19 | // coverage requires a live cluster and rides the gated Deployment E2E |
| 20 | // budget (AWS_TEST_SLOW) — see Deployment.test.ts. |
| 21 | test.provider( |
| 22 | "list returns an empty array (composite host, not enumerable)", |
| 23 | () => |
| 24 | Effect.gen(function* () { |
| 25 | const provider = yield* Provider.findProvider(Kubernetes.Job); |
| 26 | const all = yield* provider.list(); |
| 27 | expect(Array.isArray(all)).toBe(true); |
| 28 | expect(all).toEqual([]); |
| 29 | }), |
| 30 | { |
| 31 | tags: [ |
| 32 | "provider:aws", |
| 33 | "provider:kubernetes", |
| 34 | "provider:kubernetes:job", |
| 35 | "live", |
| 36 | ], |
| 37 | }, |
| 38 | ); |