Skip to content

Commit 97d144b

Browse files
committed
feat: add test for configuring Go module proxy in Nexus module
1 parent f375e5f commit 97d144b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

registry/mavrickrishi/modules/nexus/main.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,22 @@ describe("nexus", async () => {
9494
expect(output.stdout.join("\n")).toContain("🤔 no docker repository is set, skipping docker configuration.");
9595
});
9696

97+
it("configures Go module proxy", async () => {
98+
const state = await runTerraformApply(import.meta.dir, {
99+
agent_id: "test-agent",
100+
nexus_url: "https://nexus.example.com",
101+
nexus_password: "test-token",
102+
package_managers: JSON.stringify({
103+
go: ["go-public", "go-private"]
104+
})
105+
});
106+
107+
const output = await executeScriptInContainer(state, "ubuntu:20.04");
108+
expect(output.stdout.join("\n")).toContain("🐹 Configuring Go...");
109+
expect(output.stdout.join("\n")).toContain("Go proxy configured via GOPROXY environment variable");
110+
expect(output.stdout.join("\n")).toContain("🥳 Configuration complete!");
111+
});
112+
97113
it("validates nexus_url format", async () => {
98114
await expect(
99115
runTerraformApply(import.meta.dir, {

0 commit comments

Comments
 (0)