1import * as AWS from "@/AWS";
2import * as Kubernetes from "@/Kubernetes";
3import * as Provider from "@/Provider";
4import * as Test from "@/Test/Alchemy";
5import { expect } from "alchemy-test";
6import * as Effect from "effect/Effect";
7import * as Layer from "effect/Layer";
8
9const testOptions = {
10 providers: Layer.mergeAll(AWS.providers(), Kubernetes.providers()),
11};
12const { test } = Test.make(testOptions);
13
14// Ungated probe: `Manifest` applies in-cluster objects that have no
15// cloud-side enumeration attributing them to alchemy, so `list()` is
16// intentionally empty. The probe proves the provider is registered and its
17// record type-checks. The full apply path shares the live-cluster budget
18// problem of every Kubernetes workload test (an EKS control-plane create
19// is ~15 min), so lifecycle coverage rides the gated Deployment E2E
20// cluster rather than paying for its own; see Deployment.test.ts.
21test.provider(
22 "list returns an empty array (in-cluster objects)",
23 () =>
24 Effect.gen(function* () {
25 const provider = yield* Provider.findProvider(Kubernetes.Manifest);
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:manifest",
35 "live",
36 ],
37 },
38);