fix: compare active registry state in acceptance negatives
This commit is contained in:
@@ -552,13 +552,12 @@ async function executeChecks({ checks }) {
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
async function registryState(ctx) {
|
async function registryState(ctx) {
|
||||||
const repo = join(ctx.run.root, "installation", "registry", "repo");
|
const statePath = join(ctx.run.root, "installation", "registry", "state", "active.json");
|
||||||
const head = (await git(ctx, ["rev-parse", "HEAD"], { cwd: repo })).stdout.trim();
|
const active = JSON.parse(await readFile(statePath, "utf8"));
|
||||||
return {
|
return {
|
||||||
head,
|
head: active.head,
|
||||||
catalog: (await git(ctx, ["rev-parse", `HEAD:thoth-workspaces.yaml`], { cwd: repo })).stdout.trim(),
|
revisions: active.revisions.map((revision) => ({ id: revision.id, commit: revision.commit, blob: revision.blob })),
|
||||||
filesystemDescriptor: (await git(ctx, ["rev-parse", `HEAD:p11-filesystem/workspace.yaml`], { cwd: repo })).stdout.trim(),
|
catalog: active.catalog ?? null,
|
||||||
evidenceTree: (await git(ctx, ["rev-parse", `HEAD:p11-filesystem/evidence`], { cwd: repo })).stdout.trim(),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function safeErrorEnvelope(response, code, status) {
|
function safeErrorEnvelope(response, code, status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user