chore: add type parameter for testRequiredVariables
This commit is contained in:
4
test.ts
4
test.ts
@@ -133,9 +133,9 @@ export const findResourceInstance = <T extends string>(
|
|||||||
* Creates a test-case for each variable provided and ensures that the apply
|
* Creates a test-case for each variable provided and ensures that the apply
|
||||||
* fails without it.
|
* fails without it.
|
||||||
*/
|
*/
|
||||||
export const testRequiredVariables = (
|
export const testRequiredVariables = <TVars extends Record<string, string>>(
|
||||||
dir: string,
|
dir: string,
|
||||||
vars: Record<string, string>,
|
vars: TVars,
|
||||||
) => {
|
) => {
|
||||||
// Ensures that all required variables are provided.
|
// Ensures that all required variables are provided.
|
||||||
it("required variables", async () => {
|
it("required variables", async () => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { beforeAll, describe, expect, it, test } from "bun:test";
|
import { describe, expect, it, test } from "bun:test";
|
||||||
import {
|
import {
|
||||||
executeScriptInContainer,
|
executeScriptInContainer,
|
||||||
runTerraformApply,
|
runTerraformApply,
|
||||||
@@ -13,13 +13,11 @@ type TestVariables = Readonly<{
|
|||||||
admin_password?: string;
|
admin_password?: string;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
describe("Web RDP", () => {
|
describe("Web RDP", async () => {
|
||||||
beforeAll(async () => {
|
await runTerraformInit(import.meta.dir);
|
||||||
await runTerraformInit(import.meta.dir);
|
testRequiredVariables<TestVariables>(import.meta.dir, {
|
||||||
testRequiredVariables(import.meta.dir, {
|
agent_id: "foo",
|
||||||
agent_id: "foo",
|
resource_id: "bar",
|
||||||
resource_id: "bar",
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Installs the Devolutions Gateway Angular app locally on the machine", async () => {
|
it("Installs the Devolutions Gateway Angular app locally on the machine", async () => {
|
||||||
@@ -27,6 +25,8 @@ describe("Web RDP", () => {
|
|||||||
agent_id: "foo",
|
agent_id: "foo",
|
||||||
resource_id: "bar",
|
resource_id: "bar",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
throw new Error("Not implemented yet");
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user