diff --git a/filebrowser/main.test.ts b/filebrowser/main.test.ts index 79dd99d..311498c 100644 --- a/filebrowser/main.test.ts +++ b/filebrowser/main.test.ts @@ -88,4 +88,26 @@ describe("filebrowser", async () => { "📝 Logs at /tmp/filebrowser.log", ]); }); + + it("runs with subdomain=false", async () => { + const state = await runTerraformApply(import.meta.dir, { + agent_id: "foo", + subdomain: false, + }); + const output = await executeScriptInContainer(state, "alpine"); + expect(output.exitCode).toBe(0); + expect(output.stdout).toEqual([ + "\u001B[0;1mInstalling filebrowser ", + "", + "🥳 Installation complete! ", + "", + "👷 Starting filebrowser in background... ", + "", + "📂 Serving /root at http://localhost:13339 ", + "", + "Running 'filebrowser --noauth --root /root --port 13339' ", + "", + "📝 Logs at /tmp/filebrowser.log", + ]); + }); }); diff --git a/filebrowser/main.tf b/filebrowser/main.tf index 023b5f4..8aafd7a 100644 --- a/filebrowser/main.tf +++ b/filebrowser/main.tf @@ -14,13 +14,9 @@ variable "agent_id" { description = "The ID of a Coder agent." } -data "coder_workspace" "me" { - count = var.subdomain -} +data "coder_workspace" "me" {} -data "coder_workspace_owner" "me" { - count = var.subdomain -} +data "coder_workspace_owner" "me" {} variable "agent_name" { type = string