-
Notifications
You must be signed in to change notification settings - Fork 332
ceph: Fix how ceph CLI args are parsed #1098
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
Conversation
| return nil, exitStatus, goof.Newe(err) | ||
| } | ||
|
|
||
| // Search str arg for flags that can set a Ceph client id/name |
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.
comment on exported function StrContainsClient should be of the form "StrContainsClient ..."
b3e1d2d to
b5ca10d
Compare
|
Hi @mvollman, Unless the commits need to remain separate, do you mind please squashing them? Thanks! |
b5ca10d to
082806e
Compare
Codecov Report
@@ Coverage Diff @@
## master #1098 +/- ##
==========================================
- Coverage 34.19% 34.16% -0.04%
==========================================
Files 36 36
Lines 2901 2901
==========================================
- Hits 992 991 -1
- Misses 1806 1807 +1
Partials 103 103
Continue to review full report at Codecov.
|
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.
Thanks for squashing this down to 1 commit, I was just about to ask for the same thing.
This looks good -- just the one request on the test input.
| }, | ||
| { | ||
| args: "--cluster cluster2", | ||
| present: true, |
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.
This should be present: false. There is only a cluster flag in here, and therefore no client is detected. This should actually fail if you run the tests, e.g. :
go test -v github.com/thecodeteam/rexray/libstorage/drivers/storage/rbd/utils
Do you not see the tests fail?
I also had a 6th variation in the sample I pasted:
{
args: "--cluster cluster2 --id ceph",
present: true,
},
That was just to make sure we catch a mixed example.
The strContainsClient function is spliting characters instead of words and not correctly determining if a user has been defined. Moving strContainsClient to utils and adding tests.
082806e to
37ffdbf
Compare
|
@codenrhoden What is the one outstanding request? |
|
@mvollman Nothing! You took care of it in your most recent commit. Thank you! |
The
strContainsClientfunction is splitting characters instead of words and not correctly determining if a user has been defined.I mistakenly closed the original merge request #1083 while rebasing.