fix(deploy): source immutable packages from current code channel
This commit is contained in:
parent
ee07b4c04b
commit
0bf220c917
9 changed files with 41 additions and 17 deletions
|
|
@ -27,6 +27,14 @@ test("resource and manifest are immutable and path constrained", () => {
|
|||
assert.equal(validateManifest(manifest(), { requestId, commit }).unit, "example.service");
|
||||
});
|
||||
|
||||
test("architecture deployment defaults to the current Fifth Domain code channel", () => {
|
||||
const source = fs.readFileSync(path.join(__dirname, "architecture-provision-broker.js"), "utf8");
|
||||
const environment = fs.readFileSync(path.join(__dirname, "authorization.env.example"), "utf8");
|
||||
assert.match(source, /https:\/\/guanghulab\.com\/code\/bingshuo\/guanghu-ice-heart\.git/);
|
||||
assert.match(environment, /^ARCHITECTURE_PROVISION_REPO_URL=https:\/\/guanghulab\.com\/code\/bingshuo\/guanghu-ice-heart\.git$/m);
|
||||
assert.doesNotMatch(source, /ARCHITECTURE_PROVISION_REPO_URL \|\| "https:\/\/guanghulab\.com\/fifth-domain\//);
|
||||
});
|
||||
|
||||
test("unit requires non-root systemd hardening and release placeholder", () => {
|
||||
const unit = "[Service]\nUser=guanghu\nGroup=guanghu\nNoNewPrivileges=true\nPrivateTmp=true\nProtectSystem=strict\nProtectHome=true\nExecStart=/usr/bin/node __RELEASE_ROOT__/server.js\n";
|
||||
assert.equal(validateUnit(unit), unit);
|
||||
|
|
|
|||
Loading…
Reference in a new issue