added test
This commit is contained in:
@@ -63,4 +63,3 @@ module "fly-region" {
|
||||
## Associated template
|
||||
|
||||
For a pre-configured Fly.io template, see the Coder template registry.
|
||||
|
||||
|
||||
25
fly-region/main.test.ts
Normal file
25
fly-region/main.test.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import {
|
||||
executeScriptInContainer,
|
||||
runTerraformApply,
|
||||
runTerraformInit,
|
||||
testRequiredVariables,
|
||||
} from "../test";
|
||||
|
||||
describe("azure-region", async () => {
|
||||
await runTerraformInit(import.meta.dir);
|
||||
|
||||
testRequiredVariables(import.meta.dir, {});
|
||||
|
||||
it("default output", async () => {
|
||||
const state = await runTerraformApply(import.meta.dir, {});
|
||||
expect(state.outputs.value.value).toBe("ams");
|
||||
});
|
||||
|
||||
it("customized default", async () => {
|
||||
const state = await runTerraformApply(import.meta.dir, {
|
||||
default: "atl",
|
||||
});
|
||||
expect(state.outputs.value.value).toBe("atl");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user