werkdock: ordered mounts with --tmpfs, images verb, :rw accepted
Session C groundwork: Werkator's git-metadata mask needs a tmpfs BETWEEN binds (ro-bind .git, tmpfs .git/werkator, bind workspace), so -v and --tmpfs now collect into one ordered mount list and RunSpec carries Mounts instead of Binds. --tmpfs DEST is the docker flag of the same name. `werkdock images` lists loaded image names one per line, so a consumer can check existence through the CLI. -v accepts the explicit :rw docker default instead of refusing it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
263245d49e
commit
a2da6454f7
@@ -115,6 +115,25 @@ func TestRootFSValidation(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestListNamesLoadedImagesAndIgnoresTmpLeftovers(t *testing.T) {
|
||||
st := Store{Root: t.TempDir()}
|
||||
if names, err := st.List(); err != nil || names != nil {
|
||||
t.Fatalf("empty store: got %v, %v", names, err)
|
||||
}
|
||||
for _, dir := range []string{"beta", "alpha", "broken.tmp"} {
|
||||
if err := os.MkdirAll(filepath.Join(st.Root, "images", dir), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
names, err := st.List()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(names) != 2 || names[0] != "alpha" || names[1] != "beta" {
|
||||
t.Errorf("got %v, want [alpha beta]", names)
|
||||
}
|
||||
}
|
||||
|
||||
func TestImageNameFromArchive(t *testing.T) {
|
||||
tests := []struct{ in, want string }{
|
||||
{"werkator-buildenv-trixie.tar.zst", "werkator-buildenv-trixie"},
|
||||
|
||||
Reference in New Issue
Block a user