add tests

This commit is contained in:
Garrett Delfosse
2024-05-01 15:19:50 -04:00
parent 46bf422d61
commit 36fa871e7b
6 changed files with 139 additions and 21 deletions

View File

@@ -8,6 +8,7 @@ import {
runTerraformApply,
runTerraformInit,
testRequiredVariables,
writeCoder,
} from "../test";
describe("slackme", async () => {
@@ -119,15 +120,6 @@ const setupContainer = async (
return { id, instance };
};
const writeCoder = async (id: string, script: string) => {
const exec = await execContainer(id, [
"sh",
"-c",
`echo '${script}' > /usr/bin/coder && chmod +x /usr/bin/coder`,
]);
expect(exec.exitCode).toBe(0);
};
const assertSlackMessage = async (opts: {
command: string;
format?: string;