-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PWX-33887: storkctl to support namespacemapping during applicationrestore creation. #1545
Conversation
Can one of the admins verify this patch? |
cmdArgs := []string{"create", "apprestores", "-n", "test", "restore1", "--backupLocation", "backuplocation1", "--backupName", "backup1", "--namespaceMapping", "namespace1:namespace2"} | ||
expected := "ApplicationRestore restore1 started successfully\n" | ||
testCommon(t, cmdArgs, nil, expected, false) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can enhance this test to pass comma separated 2 namespaces so we cover all the bases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
a951856
to
643ceb7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1545 +/- ##
==========================================
+ Coverage 66.14% 66.23% +0.09%
==========================================
Files 43 43
Lines 5390 5405 +15
==========================================
+ Hits 3565 3580 +15
Misses 1491 1491
Partials 334 334
☔ View full report in Codecov by Sentry. |
nsMapping := strings.Split(inputMapping, ":") | ||
if len(nsMapping) == 2 { | ||
inputMappingMap[nsMapping[0]] = nsMapping[1] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to print any errormsg, if the namespace entry was not in the form x:y?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
643ceb7
to
9252279
Compare
Signed-Off-By: Diptiranjan
What type of PR is this?
What this PR does / why we need it:
Added the param for creating applicationrestore with namespacemapping with storkctl.
Does this PR change a user-facing CRD or CLI?:
Is a release note needed?:
Does this change need to be cherry-picked to a release branch?:
Test
updated in ticket PWX-33887.