-
Notifications
You must be signed in to change notification settings - Fork 70
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
Adding E2E test template #21
Adding E2E test template #21
Conversation
/assign @msau42 |
Makefile
Outdated
@@ -19,6 +19,8 @@ ifeq ($(VERSION),) | |||
endif | |||
|
|||
all: image | |||
mkdir -p bin | |||
go build -ldflags "-X main.vendorVersion=${STAGINGVERSION}" -o bin/gcfs-csi-driver ./cmd/ |
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 VERSION
Makefile
Outdated
@@ -19,6 +19,8 @@ ifeq ($(VERSION),) | |||
endif | |||
|
|||
all: image | |||
mkdir -p bin |
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.
I would put these under a "make local" rule instead
|
||
var _ = Describe("GCFS CSI Driver", func() { | ||
|
||
It("Should create->attach->stage->mount volume and check if it is writable, then unmount->unstage->detach->delete and check disk is deleted", func() { |
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.
remove "attach", "stage", "unstage" and "detach" since filestore doesn't implement those operations
defaultSizeGb int64 = 5 | ||
) | ||
|
||
var _ = Describe("GCFS CSI Driver", func() { |
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.
Call this "Google Cloud Filestore CSI Driver"
|
||
err = client.NodePublishVolume(vol.GetId(), publishDir, vol.GetAttributes()) | ||
Expect(err).To(BeNil(), "NodePublishVolume failed with error") | ||
err = testutils.ForceChmod(instance, filepath.Join("/tmp/", volName), "777") |
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 done with the mkdir command above
volName := testNamePrefix + string(uuid.NewUUID()) | ||
vol, err := client.CreateVolume(volName) | ||
Expect(err).To(BeNil(), "CreateVolume failed with error: %v", err) | ||
|
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.
Can you add a TODO here to validate the Filestore instance creation at the cloud provider layer?
You are missing the Gopkg updates for the vendor changes |
d6a0fee
to
20b9616
Compare
/ok-to-test |
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.
For some reason the commits from an unrelated merged PR are showing up. You might need to rebase
Makefile
Outdated
@@ -20,9 +20,13 @@ endif | |||
|
|||
all: image | |||
|
|||
image: | |||
image: make-local |
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.
i would not make a local build a dependency when doing a container build. please keep docker build and local build separate
Makefile
Outdated
docker build --build-arg TAG=$(VERSION) -t $(IMAGE):$(VERSION) . | ||
|
||
make-local: |
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.
i would just call this "local"
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.
in the e2e framework, you will have to change the "make" to a "make local"
Expect(err).To(BeNil(), "Failed to delete remote directory") | ||
}() | ||
|
||
err = testutils.ForceChmod(instance, filepath.Join("/tmp/", volName), "777") |
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.
Use publishDir
.
|
||
err = client.NodePublishVolume(vol.GetId(), secondPublishDir, vol.GetAttributes()) | ||
Expect(err).To(BeNil(), "NodePublishVolume failed with error") | ||
err = testutils.ForceChmod(instance, filepath.Join("/tmp/", volName), "777") |
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 secondPublishDir
and needs to happen before the NodePublishVolume.
@@ -2,46 +2,81 @@ | |||
|
|||
|
|||
[[projects]] | |||
digest = "1:180876db3ec295bb9f0babec5ca926fe9f2036b747b7c5bfcd13b333023e7cfd" |
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 you also need to include the Gopkg.toml?
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.
Didn't get any changes in that file after running dep -- ensure
lgtm, can you squash and rebase |
513fbd9
to
dc3b17d
Compare
dc3b17d
to
d2fe948
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: krunaljain, msau42 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 |
Adding E2E testing template for filestore CSI driver