-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vscode-web): add offline, use_cached, extensions_dir and auto_in…
…stall_extensions (#235)
- Loading branch information
1 parent
cd0c730
commit f5d4152
Showing
3 changed files
with
138 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { describe, expect, it } from "bun:test"; | ||
import { runTerraformApply, runTerraformInit } from "../test"; | ||
|
||
describe("vscode-web", async () => { | ||
await runTerraformInit(import.meta.dir); | ||
|
||
it("accept_license should be set to true", () => { | ||
const t = async () => { | ||
await runTerraformApply(import.meta.dir, { | ||
agent_id: "foo", | ||
accept_license: "false", | ||
}); | ||
}; | ||
expect(t).toThrow("Invalid value for variable"); | ||
}); | ||
|
||
it("use_cached and offline can not be used together", () => { | ||
const t = async () => { | ||
await runTerraformApply(import.meta.dir, { | ||
agent_id: "foo", | ||
accept_license: "true", | ||
use_cached: "true", | ||
offline: "true", | ||
}); | ||
}; | ||
expect(t).toThrow("Offline and Use Cached can not be used together"); | ||
}); | ||
|
||
it("offline and extensions can not be used together", () => { | ||
const t = async () => { | ||
await runTerraformApply(import.meta.dir, { | ||
agent_id: "foo", | ||
accept_license: "true", | ||
offline: "true", | ||
extensions: '["1", "2"]', | ||
}); | ||
}; | ||
expect(t).toThrow("Offline mode does not allow extensions to be installed"); | ||
}); | ||
|
||
// More tests depend on shebang refactors | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters