Skip to content

Commit

Permalink
fixup! WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Mar 26, 2024
1 parent bee8bb5 commit 0e7ad16
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/fixture/summary/partially-invalid-composite.ansi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Environment Variables:

❯ AUSTENITE_SVC_SERVICE_HOST kubernetes `austenite-svc` service host [ <hostname> ] ✗ set to .host.example.org, must not begin or end with a dot
AUSTENITE_SVC_SERVICE_PORT kubernetes `austenite-svc` service port [ <port number> ] • not set
15 changes: 15 additions & 0 deletions test/suite/summary.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,21 @@ describe("Validation summary", () => {
expect(exitCode).toBeGreaterThan(0);
});

it("summarizes composites with partially invalid variables", async () => {
Object.assign(process.env, {
AUSTENITE_SVC_SERVICE_HOST: ".host.example.org",
});

kubernetesAddress("austenite-svc", { default: undefined });

initialize();

await expect(mockConsole.readStderr()).toMatchFileSnapshot(
fixturePath("partially-invalid-composite"),
);
expect(exitCode).toBeGreaterThan(0);
});

it("summarizes variables that violate constraints", async () => {
Object.assign(process.env, {
AUSTENITE_STRING: "hello, world!",
Expand Down

0 comments on commit 0e7ad16

Please sign in to comment.