Skip to content

Commit

Permalink
Update Validation Logic for Clusterctl Move
Browse files Browse the repository at this point in the history
Removed the namespace condition check from the validation of 'Move'.
This is to allow validation of docker and cloud provider test site
manifests that do not use namespace.

Relates-To: #503
Change-Id: I39544ba9c9c13ff5a6519b7afd8844629e60087e
  • Loading branch information
Ratnopam Chakrabarti committed May 19, 2021
1 parent c8d9160 commit 1cd6c28
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions pkg/phase/executors/clusterctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ func (c *ClusterctlExecutor) Validate() error {
return phaseerrors.ErrInvalidPhase{Reason: "ClusterctlExecutor.InitOptions.CoreProvider is empty"}
}
case airshipv1.Move:
if c.options.MoveOptions.Namespace == "" {
return phaseerrors.ErrInvalidPhase{Reason: "ClusterctlExecutor.MoveOptions.Namespace is empty"}
}
default:
return errors.ErrUnknownExecutorAction{Action: string(c.options.Action)}
}
Expand Down
11 changes: 0 additions & 11 deletions pkg/phase/executors/clusterctl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,6 @@ func TestClusterctlExecutorValidate(t *testing.T) {
actionType: "init",
executorConfigTmpl: executorConfigTmplGood,
},
{
name: "Success move action",
actionType: "move",
executorConfigTmpl: executorConfigTmplGood,
},
{
name: "Error any other action",
actionType: "any",
Expand All @@ -257,12 +252,6 @@ func TestClusterctlExecutorValidate(t *testing.T) {
executorConfigTmpl: executorConfigTmplBad,
expectedErrString: "invalid phase: ClusterctlExecutor.InitOptions.CoreProvider is empty",
},
{
name: "Error empty move option",
actionType: "move",
executorConfigTmpl: executorConfigTmplBad,
expectedErrString: "invalid phase: ClusterctlExecutor.MoveOptions.Namespace is empty",
},
}
for _, test := range testCases {
tt := test
Expand Down

0 comments on commit 1cd6c28

Please sign in to comment.