Skip to content
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

feat: migrate smb API group to library model #245

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

alexander-ding
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
Part of #217 (migrating one API Group to v2's library based model). The v1 model will stick around until all API groups are migrated.

Which issue(s) this PR fixes:

Fixes #237

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Deferring release note till all API groups are migrated.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 13, 2022
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 13, 2022
@alexander-ding
Copy link
Contributor Author

/cc @mauriciopoppe

b[i] = charset[seededRand.Intn(len(charset))]
}
return string(b)
func TestSmbAPIGroup(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to SMB tracked in #246


var seededRand = rand.New(rand.NewSource(time.Now().UnixNano()))

func stringWithCharset(length int, charset string) string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are utils not used by any other integration test, I'd limit the scope of these functions to be inside the SMB test

I think volumeInit was used in many API Groups so I guess that one is ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved back in latest commit :)

@mauriciopoppe
Copy link
Member

Saw this in the last run:

--- PASS: TestSmbAPIGroup (62.12s)
    --- PASS: TestSmbAPIGroup/v1alpha1SmbTests (19.81s)
    --- PASS: TestSmbAPIGroup/v1beta1SmbTests (13.25s)
    --- PASS: TestSmbAPIGroup/v1beta2SmbTests (15.24s)
    --- PASS: TestSmbAPIGroup/v1SmbTests (13.82s)
=== RUN   TestSmb
--- PASS: TestSmb (11.88s)

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexander-ding, mauriciopoppe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 13, 2022
@k8s-ci-robot k8s-ci-robot merged commit 02cf55d into kubernetes-csi:master Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor the SMB API group to become a library
3 participants