Skip to content

Commit becd8f1

Browse files
committed
chore: amend error message
Remove "warning:" as it is preceded by "Error:"
1 parent 613f443 commit becd8f1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmd/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func evaluateTargetRuntimeGroupOrControlPlaneName(targetContent *file.Content) e
113113
targetFromCLI = konnectRuntimeGroup
114114
}
115115
if targetFromCLI != "" && targetFromFile != targetFromCLI {
116-
return fmt.Errorf("warning: control plane '%v' specified via "+
116+
return fmt.Errorf("control plane '%v' specified via "+
117117
"--konnect-[control-plane|runtime-group]-name flag is "+
118118
"different from '%v' found in state file(s)",
119119
targetFromCLI, targetFromFile)

tests/integration/sync_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6541,28 +6541,28 @@ func Test_Sync_KonnectRenameErrors(t *testing.T) {
65416541
name: "different runtime group names fail",
65426542
kongFile: "testdata/sync/026-konnect-rename/konnect_default_cp.yaml",
65436543
flags: []string{"--konnect-runtime-group-name", "rg1"},
6544-
expectedError: errors.New(`warning: control plane 'rg1' specified via ` +
6544+
expectedError: errors.New(`control plane 'rg1' specified via ` +
65456545
`--konnect-[control-plane|runtime-group]-name flag is different from 'default' found in state file(s)`),
65466546
},
65476547
{
65486548
name: "different runtime group names fail",
65496549
kongFile: "testdata/sync/026-konnect-rename/konnect_default_rg.yaml",
65506550
flags: []string{"--konnect-runtime-group-name", "rg1"},
6551-
expectedError: errors.New(`warning: control plane 'rg1' specified via ` +
6551+
expectedError: errors.New(`control plane 'rg1' specified via ` +
65526552
`--konnect-[control-plane|runtime-group]-name flag is different from 'default' found in state file(s)`),
65536553
},
65546554
{
65556555
name: "different control plane names fail",
65566556
kongFile: "testdata/sync/026-konnect-rename/konnect_default_cp.yaml",
65576557
flags: []string{"--konnect-control-plane-name", "cp1"},
6558-
expectedError: errors.New(`warning: control plane 'cp1' specified via ` +
6558+
expectedError: errors.New(`control plane 'cp1' specified via ` +
65596559
`--konnect-[control-plane|runtime-group]-name flag is different from 'default' found in state file(s)`),
65606560
},
65616561
{
65626562
name: "different control plane names fail",
65636563
kongFile: "testdata/sync/026-konnect-rename/konnect_default_rg.yaml",
65646564
flags: []string{"--konnect-control-plane-name", "cp1"},
6565-
expectedError: errors.New(`warning: control plane 'cp1' specified via ` +
6565+
expectedError: errors.New(`control plane 'cp1' specified via ` +
65666566
`--konnect-[control-plane|runtime-group]-name flag is different from 'default' found in state file(s)`),
65676567
},
65686568
{

0 commit comments

Comments
 (0)