Skip to content

Commit 0bbda33

Browse files
committed
Respect configured timezone in registry test
1 parent 3b20ab1 commit 0bbda33

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

scripts/registry.test.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,16 @@ execFileSync(process.execPath, ["scripts/validate-runtime-registry.mjs", registr
3737
});
3838

3939
const registry = JSON.parse(fs.readFileSync(registryPath, "utf8"));
40+
const baseSiteConfig = JSON.parse(fs.readFileSync("defaults/v8s-site-config.json", "utf8"));
41+
const customSiteConfigPath = "custom/v8s-site-config.json";
42+
const customSiteConfig = fs.existsSync(customSiteConfigPath)
43+
? JSON.parse(fs.readFileSync(customSiteConfigPath, "utf8"))
44+
: {};
45+
const expectedGeneratedTimezone = customSiteConfig.operator?.timezone || baseSiteConfig.operator?.timezone || "UTC";
4046

4147
assert.equal(registry.schema_version, RUNTIME_REGISTRY_SCHEMA_VERSION);
4248
assert.equal(registry.default_state, "permanent");
43-
assert.equal(registry.generated_timezone, "UTC");
49+
assert.equal(registry.generated_timezone, expectedGeneratedTimezone);
4450
assert.match(registry.generated_git.commit, /^$|^[0-9a-f]{40}$/);
4551
if (registry.generated_git.commit_url) {
4652
assert(registry.generated_git.commit_url.includes(registry.generated_git.commit));

0 commit comments

Comments
 (0)