Fix container build --all. #215.
We didn't need to add an arg check here because it's already there.
This commit is contained in:
20
internal/app/wwctl/container/build/build_test.go
Normal file
20
internal/app/wwctl/container/build/build_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package build
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestArgsContainerBuild is a regression test for 215.
|
||||
func TestArgsContainerBuild(t *testing.T) {
|
||||
command := GetCommand()
|
||||
|
||||
err := command.Args(command, []string{})
|
||||
if err != nil {
|
||||
t.Errorf("no arguments to container build should succeed.")
|
||||
}
|
||||
|
||||
err = command.Args(command, []string{"container1", "container2"})
|
||||
if err != nil {
|
||||
t.Errorf("multiple arguments to container build should succeed.")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user