rgw/admin: support user default-storage-class#1246
Conversation
2d3708b to
8088197
Compare
|
Any idea why the tests are failing? The two tests I touched are reported as passing in the output. |
|
8088197 to
6ecf40d
Compare
|
I guess I need to check the container to see what the zonegroup placement is. It appears that this feature may not be part of a tagged squid release: https://github.com/ceph/ceph/blob/8e376e9fe8eb7d3a00bf8a39d6d96dbc4a29eea0/src/rgw/driver/rados/rgw_rest_user.cc#L192 but is part of tentacle. |
|
|
@jhoblitt Would you like to take this forward? |
Yes. Apologies. I'll revise the PR today. Thank you for the nudge. |
6ecf40d to
fb553d9
Compare
| suite.T().Run("get user leseb by uid returns default_storage_class", func(_ *testing.T) { | ||
| suite.T().Skip("skipping test since the default_storage_class is not returned by /user") | ||
| user, err := co.GetUser(context.Background(), User{ID: "leseb"}) | ||
| assert.NoError(suite.T(), err) | ||
| assert.Equal(suite.T(), "STANDARD", user.DefaultStorageClass) | ||
| }) | ||
|
|
There was a problem hiding this comment.
I’m sorry if it wasn’t clear before, but we don’t need this test if it’s never supposed to run.
There was a problem hiding this comment.
My thinking was that this looks like a bug in the rgw api that will presumably be fixed at some point. I've removed the skipped test completely. It's unfortunately that testify suites don't support the concept of a "pending" unit test.
There was a problem hiding this comment.
Alright, if that's the case you may create a tracker and mention it as part of the skip (see rbd/snapshot_test.go for an example). But I'm still fine without the test at all.
There was a problem hiding this comment.
Thinking about it some more, it isn't clear to me that behavior is wrong. I'd like to more forward with this PR and I'll open an rgw ticket if I think it's warranted after digging through the code.
There was a problem hiding this comment.
If the behavior is not wrong then I'll reiterate Anoops comment above: if the test will never run it adds no value to the test suite and shouldn't be added.
There was a problem hiding this comment.
The skipped test has already been removed...
fb553d9 to
a830b8f
Compare
Support for this parameter was added in Squid. Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
a830b8f to
f18cd2a
Compare
Merge Queue Status
This pull request spent 15 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
Support for this parameter was added in Squid.
Checklist
//go:build ceph_previewmake api-updateto record new APIsNew or infrequent contributors may want to review the go-ceph Developer's Guide including the section on how we track API Status and the API Stability Plan.
The go-ceph project uses mergify. View the mergify command guide for information on how to interact with mergify. Add a comment with
@Mergifyiorebaseto rebase your PR when github indicates that the PR is out of date with the base branch.