Skip to content

Commit b8f0c91

Browse files
fix(local-windows-rdp): Update agent_name variable to be required in tests and adjust test cases accordingly
1 parent 1ffa9fa commit b8f0c91

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

registry/coder/modules/local-windows-rdp/main.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88

99
type TestVariables = Readonly<{
1010
agent_id: string;
11-
agent_name?: string;
11+
agent_name: string;
1212
username?: string;
1313
password?: string;
1414
display_name?: string;
@@ -58,11 +58,13 @@ describe("local-windows-rdp", async () => {
5858

5959
testRequiredVariables<TestVariables>(import.meta.dir, {
6060
agent_id: "test-agent-id",
61+
agent_name: "test-agent",
6162
});
6263

6364
it("should create RDP app with default values", async () => {
6465
const state = await runTerraformApply<TestVariables>(import.meta.dir, {
6566
agent_id: "test-agent-id",
67+
agent_name: "main",
6668
});
6769

6870
const app = findRdpApp(state);
@@ -85,6 +87,7 @@ describe("local-windows-rdp", async () => {
8587
it("should create RDP configuration script", async () => {
8688
const state = await runTerraformApply<TestVariables>(import.meta.dir, {
8789
agent_id: "test-agent-id",
90+
agent_name: "main",
8891
});
8992

9093
const script = findRdpScript(state);
@@ -128,6 +131,7 @@ describe("local-windows-rdp", async () => {
128131
it("should pass custom credentials to PowerShell script", async () => {
129132
const state = await runTerraformApply<TestVariables>(import.meta.dir, {
130133
agent_id: "test-agent-id",
134+
agent_name: "main",
131135
username: "TestAdmin",
132136
password: "TestPassword123!",
133137
});
@@ -142,6 +146,7 @@ describe("local-windows-rdp", async () => {
142146
it("should handle sensitive password variable", async () => {
143147
const state = await runTerraformApply<TestVariables>(import.meta.dir, {
144148
agent_id: "test-agent-id",
149+
agent_name: "main",
145150
password: "SensitivePass123!",
146151
});
147152

@@ -154,6 +159,7 @@ describe("local-windows-rdp", async () => {
154159
it("should use correct default agent name", async () => {
155160
const state = await runTerraformApply<TestVariables>(import.meta.dir, {
156161
agent_id: "test-agent-id",
162+
agent_name: "main",
157163
});
158164

159165
const app = findRdpApp(state);

0 commit comments

Comments
 (0)