| 1 | import * as AWS from "@/AWS"; |
| 2 | import { isNukeableHealthCheck } from "@/AWS/Route53/HealthCheck.ts"; |
| 3 | import * as Test from "@/Test/Alchemy"; |
| 4 | import { expect } from "alchemy-test"; |
| 5 | import * as Effect from "effect/Effect"; |
| 6 | |
| 7 | const { test } = Test.make({ providers: AWS.providers() }); |
| 8 | |
| 9 | test( |
| 10 | "nuke inventory excludes AWS-service-owned health checks", |
| 11 | Effect.sync(() => { |
| 12 | expect(isNukeableHealthCheck({})).toBe(true); |
| 13 | expect( |
| 14 | isNukeableHealthCheck({ |
| 15 | LinkedService: { |
| 16 | ServicePrincipal: "servicediscovery.amazonaws.com", |
| 17 | Description: "Cloud Map managed health check", |
| 18 | }, |
| 19 | }), |
| 20 | ).toBe(false); |
| 21 | expect(isNukeableHealthCheck({ LinkedService: {} })).toBe(false); |
| 22 | }), |
| 23 | { tags: ["provider:aws", "provider:aws:route53", "live"] }, |
| 24 | ); |