Skip to content

Commit bab5864

Browse files
committed
test: resolve gen eject proof state path relative to the package
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
1 parent 7e1b034 commit bab5864

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

gen/eject_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,12 @@ func TestEject_CompilesAndWires(t *testing.T) {
167167
t.Fatalf("Eject: %v", err)
168168
}
169169

170-
const stateAbs = "/Users/joshua.temple/go/src/github.com/stablekernel/crucible/.worktrees/gen-eject/state"
170+
// Resolve the sibling state module relative to this package so the proof
171+
// works from any checkout; the build runs with cwd at the gen package dir.
172+
stateAbs, err := filepath.Abs("../state")
173+
if err != nil {
174+
t.Fatalf("resolve state module path: %v", err)
175+
}
171176

172177
tmp := t.TempDir()
173178
gomod := "module genout\n\ngo 1.25.11\n\nrequire github.com/stablekernel/crucible/state v0.0.0\n\nreplace github.com/stablekernel/crucible/state => " + stateAbs + "\n"

0 commit comments

Comments
 (0)