mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 05:02:40 +00:00
test(go): consolidate GOPATH evidence checks in the compiled CLI (#11866)
This commit is contained in:
1 parent
3f361d820f
commit
91e26d2ef3
2 files changed
+1
-23
No files matched your search
@@ -634,6 +634,7 @@ cliTest(
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const evidence = evidenceResultOf(goBinarySchema).parse(result.json);
|
||||
expect(evidence.normalized_result.build_info?.module_text).toBe(moduleText);
|
||||
expect(evidence.normalized_result.build_info?.module).toMatchObject({
|
||||
path: "example.com/tool/cmd/tool",
|
||||
main: null,
|
||||
|
||||
@@ -149,29 +149,6 @@ it.skipIf(process.platform === "win32")(
|
||||
},
|
||||
);
|
||||
|
||||
it("reports a parse-complete GOPATH module text as unknown dependency coverage", async () => {
|
||||
const moduleText =
|
||||
"path\texample.com/tool/cmd/tool\n" +
|
||||
"build\t-compiler=gc\n" +
|
||||
"build\tGOOS=linux\n";
|
||||
const root = await createTestTempDirectory("rea-go-gopath-metadata-");
|
||||
const path = join(root, "application.elf");
|
||||
await writeFile(path, createGoBinaryFixture({ moduleText }).bytes);
|
||||
const result = await new GoBinaryProvider().inspect({ path });
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.build_info?.module_text).toBe(moduleText);
|
||||
expect(result.value.build_info?.module).toMatchObject({
|
||||
path: "example.com/tool/cmd/tool",
|
||||
main: null,
|
||||
dependencies: [],
|
||||
complete: true,
|
||||
unparsed_lines: [],
|
||||
});
|
||||
expect(result.value.limitations.join(" ")).toContain(
|
||||
"Dependency coverage is unknown",
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps a module-mode build with no dependency records as an observed empty list", async () => {
|
||||
const moduleText =
|
||||
"path\texample.com/tool\n" +
|
||||
|
||||
Reference in new issue
Block a user