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

Add csi-sanity tests #2254

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ElijahQuinones
Copy link
Member

@ElijahQuinones ElijahQuinones commented Dec 4, 2024

What type of PR is this?

/kind feature

What is this PR about? / Why do we need it?

This PR adds csi-sanity tests to the driver to be enable in CI afterwards.

How was this change tested?

Ran make test-sanity
and received the following results

Ran 76 of 92 Specs in 0.355 seconds
SUCCESS! -- 76 Passed | 0 Failed | 1 Pending | 15 Skipped
--- PASS: TestSanity (0.36s)
PASS
ok  	github.com/kubernetes-sigs/aws-ebs-csi-driver/tests/sanity	1.429s

Does this PR introduce a user-facing change?

Add csi-sanity tests

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 4, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from elijahquinones. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 4, 2024
@ElijahQuinones
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 4, 2024
@ElijahQuinones ElijahQuinones added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Code Coverage Diff

File Old Coverage New Coverage Delta
github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/driver/controller_modify_volume.go 78.0% 77.4% -0.7

@ElijahQuinones
Copy link
Member Author

/retest

@ElijahQuinones ElijahQuinones force-pushed the sanity branch 2 times, most recently from 1cd6007 to 79b840d Compare December 5, 2024 21:01
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 5, 2024
@ElijahQuinones ElijahQuinones force-pushed the sanity branch 2 times, most recently from e328221 to 508b90e Compare December 6, 2024 22:22
@ElijahQuinones ElijahQuinones removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 6, 2024
tests/sanity/sanity_test.go Show resolved Hide resolved
tests/sanity/sanity_test.go Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@ElijahQuinones ElijahQuinones force-pushed the sanity branch 3 times, most recently from 3dc7cd8 to 70c4ce9 Compare December 19, 2024 20:48
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 19, 2024
Copy link
Contributor

@AndrewSirenko AndrewSirenko left a comment

Choose a reason for hiding this comment

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

/lgtm

tests/sanity/sanity_test.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 24, 2024
)

var (
disks = make(map[string]*cloud.Disk)
Copy link
Contributor

Choose a reason for hiding this comment

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

np: Can make these members of FakeCloud, instead of package level fields.

snapshotNameToID = make(map[string]string)
)

type FakeCloud struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

np: can make this package-internal fakeCloud if we're not going to be using it outside of this package.

mountPath := path.Join(tmpDir, "mount")
stagePath := path.Join(tmpDir, "stage")

fakeMounter, FakeCloud, fakeMetadataService, fakeKubernetesClient := createMockObjects(mockCtrl, mountPath)
Copy link
Contributor

Choose a reason for hiding this comment

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

np: consistent naming: fakeCloud

tests/sanity/sanity_test.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

5 participants