Change image provision directory to "images"

Previous name (before #1641) was "container." New name (from #1641) was "image"
but a plural name seems better.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-01-19 14:27:22 -07:00
parent 86d09902d3
commit ca61494297
3 changed files with 8 additions and 8 deletions

View File

@@ -28,6 +28,6 @@ func Test_Copy(t *testing.T) {
baseCmd.SetArgs([]string{"-b", "test-image", "test-image-copy"}) baseCmd.SetArgs([]string{"-b", "test-image", "test-image-copy"})
err := baseCmd.Execute() err := baseCmd.Execute()
assert.NoError(t, err) assert.NoError(t, err)
assert.FileExists(t, path.Join(env.BaseDir, testenv.WWProvisiondir, "image", "test-image-copy.img")) assert.FileExists(t, path.Join(env.BaseDir, testenv.WWProvisiondir, "images", "test-image-copy.img"))
}) })
} }

View File

@@ -82,8 +82,8 @@ func Test_Exec(t *testing.T) {
nodeName = "" nodeName = ""
Build = true Build = true
SyncUser = false SyncUser = false
os.Remove(env.GetPath("/srv/warewulf/image/test.img")) os.Remove(env.GetPath("/srv/warewulf/images/test.img"))
os.Remove(env.GetPath("/srv/warewulf/image/test.img.gz")) os.Remove(env.GetPath("/srv/warewulf/images/test.img.gz"))
}() }()
cmd := GetCommand() cmd := GetCommand()
cmd.SetArgs(tt.args) cmd.SetArgs(tt.args)
@@ -95,11 +95,11 @@ func Test_Exec(t *testing.T) {
assert.NotEmpty(t, out.String()) assert.NotEmpty(t, out.String())
assert.Contains(t, out.String(), tt.stdout) assert.Contains(t, out.String(), tt.stdout)
if tt.build { if tt.build {
assert.FileExists(t, env.GetPath("/srv/warewulf/image/test.img")) assert.FileExists(t, env.GetPath("/srv/warewulf/images/test.img"))
assert.FileExists(t, env.GetPath("/srv/warewulf/image/test.img.gz")) assert.FileExists(t, env.GetPath("/srv/warewulf/images/test.img.gz"))
} else { } else {
assert.NoFileExists(t, env.GetPath("/srv/warewulf/image/test.img")) assert.NoFileExists(t, env.GetPath("/srv/warewulf/images/test.img"))
assert.NoFileExists(t, env.GetPath("/srv/warewulf/image/test.img.gz")) assert.NoFileExists(t, env.GetPath("/srv/warewulf/images/test.img.gz"))
} }
}) })
} }

View File

@@ -25,7 +25,7 @@ func RunDir(name string) string {
func ImageParentDir() string { func ImageParentDir() string {
conf := warewulfconf.Get() conf := warewulfconf.Get()
return path.Join(conf.Paths.WWProvisiondir, "image") return path.Join(conf.Paths.WWProvisiondir, "images")
} }
func ImageFile(name string) string { func ImageFile(name string) string {