Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions registry/coder/modules/filebrowser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A file browser for your workspace.
module "filebrowser" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/filebrowser/coder"
version = "1.1.0"
version = "1.1.1"
agent_id = coder_agent.example.id
}
```
Expand All @@ -30,7 +30,7 @@ module "filebrowser" {
module "filebrowser" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/filebrowser/coder"
version = "1.1.0"
version = "1.1.1"
agent_id = coder_agent.example.id
folder = "/home/coder/project"
}
Expand All @@ -42,7 +42,7 @@ module "filebrowser" {
module "filebrowser" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/filebrowser/coder"
version = "1.1.0"
version = "1.1.1"
agent_id = coder_agent.example.id
database_path = ".config/filebrowser.db"
}
Expand All @@ -54,7 +54,7 @@ module "filebrowser" {
module "filebrowser" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/filebrowser/coder"
version = "1.1.0"
version = "1.1.1"
agent_id = coder_agent.example.id
agent_name = "main"
subdomain = false
Expand Down
15 changes: 8 additions & 7 deletions registry/coder/modules/filebrowser/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
} from "~test";

function testBaseLine(output: scriptOutput) {
expect(output.exitCode).toBe(0);

Check failure on line 11 in registry/coder/modules/filebrowser/main.test.ts

View workflow job for this annotation

GitHub Actions / Validate Terraform output

error: expect(received).toBe(expected)

Expected: 0 Received: 1 at testBaseLine (/home/runner/work/registry/registry/registry/coder/modules/filebrowser/main.test.ts:11:27) at <anonymous> (/home/runner/work/registry/registry/registry/coder/modules/filebrowser/main.test.ts:104:5)

Check failure on line 11 in registry/coder/modules/filebrowser/main.test.ts

View workflow job for this annotation

GitHub Actions / Validate Terraform output

error: expect(received).toBe(expected)

Expected: 0 Received: 1 at testBaseLine (/home/runner/work/registry/registry/registry/coder/modules/filebrowser/main.test.ts:11:27) at <anonymous> (/home/runner/work/registry/registry/registry/coder/modules/filebrowser/main.test.ts:73:5)

Check failure on line 11 in registry/coder/modules/filebrowser/main.test.ts

View workflow job for this annotation

GitHub Actions / Validate Terraform output

error: expect(received).toBe(expected)

Expected: 0 Received: 1 at testBaseLine (/home/runner/work/registry/registry/registry/coder/modules/filebrowser/main.test.ts:11:27) at <anonymous> (/home/runner/work/registry/registry/registry/coder/modules/filebrowser/main.test.ts:57:5)

const expectedLines = [
"\u001b[[0;1mInstalling filebrowser ",
Expand Down Expand Up @@ -55,36 +55,37 @@
);

testBaseLine(output);
});
}, 15000);

it("runs with database_path var", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
database_path: ".config/filebrowser.db",
});

const output = await await executeScriptInContainer(
const output = await executeScriptInContainer(
state,
"alpine/curl",
"sh",
"apk add bash",
);

testBaseLine(output);
});
}, 15000);

it("runs with folder var", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
folder: "/home/coder/project",
});
const output = await await executeScriptInContainer(
const output = await executeScriptInContainer(
state,
"alpine/curl",
"sh",
"apk add bash",
);
});

}, 15000);

it("runs with subdomain=false", async () => {
const state = await runTerraformApply(import.meta.dir, {
Expand All @@ -93,13 +94,13 @@
subdomain: false,
});

const output = await await executeScriptInContainer(
const output = await executeScriptInContainer(
state,
"alpine/curl",
"sh",
"apk add bash",
);

testBaseLine(output);
});
}, 15000);
});
7 changes: 6 additions & 1 deletion registry/coder/modules/filebrowser/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ resource "coder_script" "filebrowser" {
LOG_PATH : var.log_path,
PORT : var.port,
FOLDER : var.folder,
LOG_PATH : var.log_path,
DB_PATH : var.database_path,
SUBDOMAIN : var.subdomain,
SERVER_BASE_PATH : local.server_base_path
Expand Down Expand Up @@ -128,3 +127,9 @@ locals {
url = "http://localhost:${var.port}${local.server_base_path}"
healthcheck_url = "http://localhost:${var.port}${local.server_base_path}/health"
}

resource "coder_env" "fb_noauth" {
agent_id = var.agent_id
name = "FB_NOAUTH"
value = "true"
}
Loading