Skip to content

Commit

Permalink
Add a test case to TestInvalidCommands
Browse files Browse the repository at this point in the history
  • Loading branch information
upils committed Oct 18, 2023
1 parent 30926cc commit 9815ea4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/ubuntu-image/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ func TestInvalidCommands(t *testing.T) {
{"invalid_flag", []string{"classic"}, []string{"--nonexistent"}, "unknown flag `nonexistent'"},
{"invalid_validation", []string{"snap"}, []string{"--validation=test"}, "unknown flag `validation'"},
{"invalid_sector_size", []string{"snap"}, []string{"--sector_size=123"}, "unknown flag `sector_size'"},
{"missing_flag", []string{"pack"}, []string{"--artifact-type=raw"}, "the required flags `--gadget-dir' and `--rootfs-dir' were not specified"},
{"missing_one_flag", []string{"pack"}, []string{"--artifact-type=raw"}, "the required flags `--gadget-dir' and `--rootfs-dir' were not specified"},
{"missing_flags", []string{"pack"}, []string{"--artifact-type=raw", "--gadget-dir=./test"}, "the required flag `--rootfs-dir' was not specified"},
}
for _, tc := range testCases {
tc := tc // capture range variable for parallel execution
Expand Down

0 comments on commit 9815ea4

Please sign in to comment.