From 9815ea4cbdecfcc34cad77fa150623f547df4092 Mon Sep 17 00:00:00 2001 From: Paul Mars Date: Wed, 18 Oct 2023 12:23:12 +0200 Subject: [PATCH] Add a test case to TestInvalidCommands --- cmd/ubuntu-image/main_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/ubuntu-image/main_test.go b/cmd/ubuntu-image/main_test.go index ef78bf56..dfaf0a4b 100644 --- a/cmd/ubuntu-image/main_test.go +++ b/cmd/ubuntu-image/main_test.go @@ -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