What this PR does / why we need it:
Add e2e tests for hostpath type field
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #64522
Special notes for your reviewer:
/cc msau42 jsafrane
/cc @kubernetes/sig-storage-pr-reviews
Release note:
add e2e tests for HostPathType
https://github.com/kubernetes/kubernetes/pull/64829
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: dixudx
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: gnufied
Assign the PR to them by writing /assign @gnufied in a comment when ready.
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
@dixudx: The following test failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|---|---|---|
| pull-kubernetes-typecheck | c72d216 | link | /test pull-kubernetes-typecheck |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-verify | c72d216 | link | /test pull-kubernetes-verify |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-typecheck | c72d216 | link | /test pull-kubernetes-typecheck |
| pull-kubernetes-verify | c72d216 | link | /test pull-kubernetes-verify |
| pull-kubernetes-integration | c72d216 | link | /test pull-kubernetes-integration |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-typecheck | c72d216 | link | /test pull-kubernetes-typecheck |
| pull-kubernetes-verify | c72d216 | link | /test pull-kubernetes-verify |
| pull-kubernetes-integration | c72d216 | link | /test pull-kubernetes-integration |
| pull-kubernetes-e2e-kops-aws | c72d216 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-typecheck | c72d216 | link | /test pull-kubernetes-typecheck |
| pull-kubernetes-verify | c72d216 | link | /test pull-kubernetes-verify |
| pull-kubernetes-integration | c72d216 | link | /test pull-kubernetes-integration |
| pull-kubernetes-e2e-kops-aws | c72d216 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | c72d216 | link | /test pull-kubernetes-e2e-gce |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-verify | c72d216 | link | /test pull-kubernetes-verify |
| pull-kubernetes-integration | c72d216 | link | /test pull-kubernetes-integration |
| pull-kubernetes-e2e-kops-aws | c72d216 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | c72d216 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-typecheck | 118ba36 | link | /test pull-kubernetes-typecheck |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
| pull-kubernetes-node-e2e | 118ba36 | link | /test pull-kubernetes-node-e2e |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | c72d216 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | c72d216 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-typecheck | 118ba36 | link | /test pull-kubernetes-typecheck |
| pull-kubernetes-node-e2e | 118ba36 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-e2e-gce-100-performance | 118ba36 | link | /test pull-kubernetes-e2e-gce-100-performance |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | c72d216 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | c72d216 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-typecheck | 118ba36 | link | /test pull-kubernetes-typecheck |
| pull-kubernetes-node-e2e | 118ba36 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-e2e-gce-100-performance | 118ba36 | link | /test pull-kubernetes-e2e-gce-100-performance |
| pull-kubernetes-verify | 118ba36 | link | /test pull-kubernetes-verify |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | c72d216 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-typecheck | 118ba36 | link | /test pull-kubernetes-typecheck |
| pull-kubernetes-node-e2e | 118ba36 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-e2e-gce-100-performance | 118ba36 | link | /test pull-kubernetes-e2e-gce-100-performance |
| pull-kubernetes-verify | 118ba36 | link | /test pull-kubernetes-verify |
| pull-kubernetes-e2e-kops-aws | 118ba36 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-typecheck | 118ba36 | link | /test pull-kubernetes-typecheck |
| pull-kubernetes-node-e2e | 118ba36 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-e2e-gce-100-performance | 118ba36 | link | /test pull-kubernetes-e2e-gce-100-performance |
| pull-kubernetes-verify | 118ba36 | link | /test pull-kubernetes-verify |
| pull-kubernetes-e2e-kops-aws | 118ba36 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | 118ba36 | link | /test pull-kubernetes-e2e-gce |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
| pull-kubernetes-kubemark-e2e-gce-big | 118ba36 | link | /test pull-kubernetes-kubemark-e2e-gce-big |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@msau42 commented on this pull request.
In test/e2e/storage/host_path_type.go:
> + hostPathUnset = v1.HostPathUnset
+ hostPathDirectoryOrCreate = v1.HostPathDirectoryOrCreate
+ hostPathDirectory = v1.HostPathDirectory
+ hostPathFileOrCreate = v1.HostPathFileOrCreate
+ hostPathFile = v1.HostPathFile
+ hostPathSocket = v1.HostPathSocket
+ hostPathCharDev = v1.HostPathCharDev
+ hostPathBlockDev = v1.HostPathBlockDev
+
+ config = &localTestConfig{
+ ns: f.Namespace.Name,
+ client: f.ClientSet,
+ }
+
+ By("Create a pod for further testing")
+ hostDir := "/var/tmp/hostpath-test"
You may need to use "/tmp" instead
In test/e2e/storage/host_path_type.go:
> + config *localTestConfig
+
+ hostPathUnset v1.HostPathType
+ hostPathDirectoryOrCreate v1.HostPathType
+ hostPathDirectory v1.HostPathType
+ hostPathFileOrCreate v1.HostPathType
+ hostPathFile v1.HostPathType
+ hostPathSocket v1.HostPathType
+ hostPathCharDev v1.HostPathType
+ hostPathBlockDev v1.HostPathType
+ )
+
+ BeforeEach(func() {
+ ns = f.Namespace.Name
+
+ hostPathUnset = v1.HostPathUnset
can these be initialized in var above since they never change?
In test/e2e/storage/host_path_type.go:
> + hostDir := "/var/tmp/hostpath-test"
+ mountDir := "/mnt/test"
+ basePod = f.PodClient().CreateSync(newHostPathTypeTestPod("", hostDir, mountDir, &hostPathDirectoryOrCreate))
+
+ By("Create a temporary clean directory for further testing")
+ result, err := utils.PodExec(basePod, fmt.Sprintf("mktemp -d -p %s hostpath.XXXXXX", mountDir))
+ Expect(err).NotTo(HaveOccurred())
+
+ mountBaseDir = result
+ hostBaseDir = path.Join(hostDir, strings.TrimPrefix(result, mountDir))
+ })
+
+ It("HostPath Directory Test", func() {
+ targetDir := path.Join(hostBaseDir, "adir")
+
+ By("Should fail on mounting non-existent directory 'adir' when HostPathType is HostPathDirectory")
Do you want to make each of these cases it's own test case (it's own It())? Then the outer It() could actually be Context() instead.
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce-100-performance | 118ba36 | link | /test pull-kubernetes-e2e-gce-100-performance |
| pull-kubernetes-verify | 118ba36 | link | /test pull-kubernetes-verify |
| pull-kubernetes-e2e-kops-aws | 118ba36 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | 118ba36 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-kubemark-e2e-gce-big | 118ba36 | link | /test pull-kubernetes-kubemark-e2e-gce-big |
| pull-kubernetes-node-e2e | aa24e75 | link | /test pull-kubernetes-node-e2e |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/test pull-kubernetes-node-e2e
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce-100-performance | 118ba36 | link | /test pull-kubernetes-e2e-gce-100-performance |
| pull-kubernetes-verify | 118ba36 | link | /test pull-kubernetes-verify |
| pull-kubernetes-e2e-kops-aws | 118ba36 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-kubemark-e2e-gce-big | 118ba36 | link | /test pull-kubernetes-kubemark-e2e-gce-big |
| pull-kubernetes-node-e2e | aa24e75 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-e2e-gce | aa24e75 | link | /test pull-kubernetes-e2e-gce |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-kubemark-e2e-gce-big | 118ba36 | link | /test pull-kubernetes-kubemark-e2e-gce-big |
| pull-kubernetes-node-e2e | aa24e75 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-e2e-gce | aa24e75 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | aa24e75 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/retest
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | aa24e75 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | aa24e75 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | aa24e75 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | aa24e75 | link | /test pull-kubernetes-e2e-gce |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | aa24e75 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | aa24e75 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-node-e2e | 7476126 | link | /test pull-kubernetes-node-e2e |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | aa24e75 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | aa24e75 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-node-e2e | 7476126 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-integration | 7476126 | link | /test pull-kubernetes-integration |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | aa24e75 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-node-e2e | 7476126 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-integration | 7476126 | link | /test pull-kubernetes-integration |
| pull-kubernetes-e2e-kops-aws | 7476126 | link | /test pull-kubernetes-e2e-kops-aws |
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-node-e2e | 7476126 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-integration | 7476126 | link | /test pull-kubernetes-integration |
| pull-kubernetes-e2e-kops-aws | 7476126 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | 7476126 | link | /test pull-kubernetes-e2e-gce |
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 7476126 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | 34f337d | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-node-e2e | 11e3dde | link | /test pull-kubernetes-node-e2e |
/test pull-kubernetes-node-e2e
@dixudx: The following test failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/test pull-kubernetes-integration
@dixudx: The following test failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | 6b9cec6 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/test pull-kubernetes-e2e-kops-aws
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 6b9cec6 | link | /test pull-kubernetes-e2e-gce |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/retest
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|---|---|---|
| pull-kubernetes-e2e-gce | 6b9cec6 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | 6b9cec6 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/retest
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 6b9cec6 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | 6b9cec6 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/retest
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 6b9cec6 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | 6b9cec6 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/test pull-kubernetes-e2e-kops-aws
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | 6b9cec6 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | 6b9cec6 | link | /test pull-kubernetes-e2e-gce |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | 6b9cec6 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | 6b9cec6 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-node-e2e | 3e03f31 | link | /test pull-kubernetes-node-e2e |
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 6b9cec6 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-node-e2e | 3e03f31 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-e2e-kops-aws | 3e03f31 | link | /test pull-kubernetes-e2e-kops-aws |
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-node-e2e | 3e03f31 | link | /test pull-kubernetes-node-e2e |
| pull-kubernetes-e2e-kops-aws | 3e03f31 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | 3e03f31 | link | /test pull-kubernetes-e2e-gce |
/retest
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 3e03f31 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | 3e03f31 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/retest
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 3e03f31 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | 3e03f31 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/retest
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 3e03f31 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | 3e03f31 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@msau42 commented on this pull request.
Thanks this looks great! Just some minor comments
In test/e2e/storage/host_path_type.go:
> + hostPathFileOrCreate v1.HostPathType = v1.HostPathFileOrCreate
+ hostPathFile v1.HostPathType = v1.HostPathFile
+ hostPathSocket v1.HostPathType = v1.HostPathSocket
+ hostPathCharDev v1.HostPathType = v1.HostPathCharDev
+ hostPathBlockDev v1.HostPathType = v1.HostPathBlockDev
+ )
+
+ BeforeEach(func() {
+ ns = f.Namespace.Name
+
+ By("Create a pod for further testing")
+ hostDir := "/tmp/hostpath-test"
+ mountDir := "/mnt/test"
+ basePod = f.PodClient().CreateSync(newHostPathTypeTestPod("", hostDir, mountDir, &hostPathDirectoryOrCreate))
+
+ By("Create a temporary clean directory for further testing")
There should be an aftereach to cleanup all these tmp directories
In test/e2e/storage/host_path_type.go:
> +
+ By("Create a temporary clean directory for further testing")
+ result, err := utils.PodExec(basePod, fmt.Sprintf("mktemp -d -p %s hostpath.XXXXXX", mountDir))
+ Expect(err).NotTo(HaveOccurred())
+
+ mountBaseDir = strings.TrimSpace(result)
+ hostBaseDir = path.Join(hostDir, strings.TrimPrefix(mountBaseDir, mountDir))
+ })
+
+ Context("HostPathType Directory Test", func() {
+ var targetDir string
+
+ BeforeEach(func() {
+ targetDir = path.Join(hostBaseDir, "adir")
+
+ By("Should fail on mounting non-existent directory 'adir' when HostPathType is HostPathDirectory")
Can each HostPathType be a separate It() instead of inside the BeforeEach()?
In test/e2e/storage/host_path_type.go:
> +
+ By("Create a temporary clean directory for further testing")
+ result, err := utils.PodExec(basePod, fmt.Sprintf("mktemp -d -p %s hostpath.XXXXXX", mountDir))
+ Expect(err).NotTo(HaveOccurred())
+
+ mountBaseDir = strings.TrimSpace(result)
+ hostBaseDir = path.Join(hostDir, strings.TrimPrefix(mountBaseDir, mountDir))
+ })
+
+ Context("HostPathType Directory Test", func() {
+ var targetDir string
+
+ BeforeEach(func() {
+ targetDir = path.Join(hostBaseDir, "adir")
+
+ By("Should fail on mounting non-existent directory 'adir' when HostPathType is HostPathDirectory")
Also should we have test cases where the hostpath is of the wrong type? For example, hostpath is a file but type is HostPathDirectory.
@dixudx commented on this pull request.
In test/e2e/storage/host_path_type.go:
> + hostPathFileOrCreate v1.HostPathType = v1.HostPathFileOrCreate
+ hostPathFile v1.HostPathType = v1.HostPathFile
+ hostPathSocket v1.HostPathType = v1.HostPathSocket
+ hostPathCharDev v1.HostPathType = v1.HostPathCharDev
+ hostPathBlockDev v1.HostPathType = v1.HostPathBlockDev
+ )
+
+ BeforeEach(func() {
+ ns = f.Namespace.Name
+
+ By("Create a pod for further testing")
+ hostDir := "/tmp/hostpath-test"
+ mountDir := "/mnt/test"
+ basePod = f.PodClient().CreateSync(newHostPathTypeTestPod("", hostDir, mountDir, &hostPathDirectoryOrCreate))
+
+ By("Create a temporary clean directory for further testing")
Yeah. Will add it.
> +
+ By("Create a temporary clean directory for further testing")
+ result, err := utils.PodExec(basePod, fmt.Sprintf("mktemp -d -p %s hostpath.XXXXXX", mountDir))
+ Expect(err).NotTo(HaveOccurred())
+
+ mountBaseDir = strings.TrimSpace(result)
+ hostBaseDir = path.Join(hostDir, strings.TrimPrefix(mountBaseDir, mountDir))
+ })
+
+ Context("HostPathType Directory Test", func() {
+ var targetDir string
+
+ BeforeEach(func() {
+ targetDir = path.Join(hostBaseDir, "adir")
+
+ By("Should fail on mounting non-existent directory 'adir' when HostPathType is HostPathDirectory")
We do have separate It(). Here BeforeEach() is mainly used to prepare the needed environment.
@dixudx commented on this pull request.
In test/e2e/storage/host_path_type.go:
> +
+ By("Create a temporary clean directory for further testing")
+ result, err := utils.PodExec(basePod, fmt.Sprintf("mktemp -d -p %s hostpath.XXXXXX", mountDir))
+ Expect(err).NotTo(HaveOccurred())
+
+ mountBaseDir = strings.TrimSpace(result)
+ hostBaseDir = path.Join(hostDir, strings.TrimPrefix(mountBaseDir, mountDir))
+ })
+
+ Context("HostPathType Directory Test", func() {
+ var targetDir string
+
+ BeforeEach(func() {
+ targetDir = path.Join(hostBaseDir, "adir")
+
+ By("Should fail on mounting non-existent directory 'adir' when HostPathType is HostPathDirectory")
Yeah, wrong hostpath type is not well tested. Will cover that.
@msau42 commented on this pull request.
In test/e2e/storage/host_path_type.go:
> +
+ By("Create a temporary clean directory for further testing")
+ result, err := utils.PodExec(basePod, fmt.Sprintf("mktemp -d -p %s hostpath.XXXXXX", mountDir))
+ Expect(err).NotTo(HaveOccurred())
+
+ mountBaseDir = strings.TrimSpace(result)
+ hostBaseDir = path.Join(hostDir, strings.TrimPrefix(mountBaseDir, mountDir))
+ })
+
+ Context("HostPathType Directory Test", func() {
+ var targetDir string
+
+ BeforeEach(func() {
+ targetDir = path.Join(hostBaseDir, "adir")
+
+ By("Should fail on mounting non-existent directory 'adir' when HostPathType is HostPathDirectory")
I guess it's a little strange the the By() in the BeforeEach() could actually be a standalone test case too.
/retest
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | 3e03f31 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | 3e03f31 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: dixudx
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: gnufied
If they are not already assigned, you can assign the PR to them by writing /assign @gnufied in a comment when ready.
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
@msau42 Updated. PTAL. Thanks.
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | 70b817d | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
> +
+ hostPathUnset = v1.HostPathUnset
+ hostPathDirectoryOrCreate = v1.HostPathDirectoryOrCreate
+ hostPathDirectory = v1.HostPathDirectory
+ hostPathFileOrCreate = v1.HostPathFileOrCreate
+ hostPathFile = v1.HostPathFile
+ hostPathSocket = v1.HostPathSocket
+ hostPathCharDev = v1.HostPathCharDev
+ hostPathBlockDev = v1.HostPathBlockDev
+ )
+
+ BeforeEach(func() {
+ ns = f.Namespace.Name
+
+ By("Create a pod for further testing")
+ hostDir := "/tmp/hostpath-test"
Can the hostDir also include the test namespace so that each test run will use a unique directory? Then, you don't need to mktmp below.
In test/e2e/storage/host_path_type.go:
> + hostPathUnset = v1.HostPathUnset
+ hostPathDirectoryOrCreate = v1.HostPathDirectoryOrCreate
+ hostPathDirectory = v1.HostPathDirectory
+ hostPathFileOrCreate = v1.HostPathFileOrCreate
+ hostPathFile = v1.HostPathFile
+ hostPathSocket = v1.HostPathSocket
+ hostPathCharDev = v1.HostPathCharDev
+ hostPathBlockDev = v1.HostPathBlockDev
+ )
+
+ BeforeEach(func() {
+ ns = f.Namespace.Name
+
+ By("Create a pod for further testing")
+ hostDir := "/tmp/hostpath-test"
+ mountDir := "/mnt/test"
It seems like all the tests cases use the same mountDir. Does it need to be an argument?
In test/e2e/storage/host_path_type.go:
> +
+ By("Create a temporary clean directory for further testing")
+ result, err := utils.PodExec(basePod, fmt.Sprintf("mktemp -d -p %s hostpath.XXXXXX", mountDir))
+ Expect(err).NotTo(HaveOccurred())
+
+ mountBaseDir = strings.TrimSpace(result)
+ hostBaseDir = path.Join(hostDir, strings.TrimPrefix(mountBaseDir, mountDir))
+ })
+
+ Context("HostPathType Directory Test", func() {
+ var targetDir string
+
+ BeforeEach(func() {
+ targetDir = path.Join(hostBaseDir, "adir")
+
+ By("Should fail on mounting non-existent directory 'adir' when HostPathType is HostPathDirectory")
I think this particular scenario of failing when the directory doesn't exist should be its own test case (a separate It()) instead of in the BeforeEach(). You could use a different directory like "does-not-exist-dir". Same for all the other types
@msau42 Updated. PTAL. Thanks.
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | d057fa0 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | d057fa0 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | d057fa0 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-gce-100-performance | d057fa0 | link | /test pull-kubernetes-e2e-gce-100-performance |
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | d057fa0 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | d057fa0 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-gce-100-performance | d057fa0 | link | /test pull-kubernetes-e2e-gce-100-performance |
| pull-kubernetes-verify | 22fb130 | link | /test pull-kubernetes-verify |
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-verify | 22fb130 | link | /test pull-kubernetes-verify |
| pull-kubernetes-e2e-kops-aws | 22fb130 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | 22fb130 | link | /test pull-kubernetes-e2e-gce |
> + BeforeEach(func() {
+ ns = f.Namespace.Name
+
+ By("Create a pod for further testing")
+ hostBaseDir := path.Join("/tmp", ns)
+ mountBaseDir := "/mnt/test"
+ basePod = f.PodClient().CreateSync(newHostPathTypeTestPod("", hostBaseDir, mountBaseDir, &hostPathDirectoryOrCreate))
+ })
+
+ Context("HostPathType Directory Test", func() {
+ var targetDir string
+
+ BeforeEach(func() {
+ targetDir = path.Join(hostBaseDir, "adir")
+ By("Should automatically create a new directory 'adir' when HostPathType is HostPathDirectoryOrCreate")
+ newPod, err := f.ClientSet.CoreV1().Pods(ns).Create(newHostPathTypeTestPod(basePod.Spec.NodeName, targetDir, "/mnt/test", &hostPathDirectoryOrCreate))
can this use verifyPodHostPathType?
In test/e2e/storage/host_path_type.go:
> + })
+
+ Context("HostPathType Directory Test", func() {
+ var targetDir string
+
+ BeforeEach(func() {
+ targetDir = path.Join(hostBaseDir, "adir")
+ By("Should automatically create a new directory 'adir' when HostPathType is HostPathDirectoryOrCreate")
+ newPod, err := f.ClientSet.CoreV1().Pods(ns).Create(newHostPathTypeTestPod(basePod.Spec.NodeName, targetDir, "/mnt/test", &hostPathDirectoryOrCreate))
+ Expect(err).NotTo(HaveOccurred())
+ framework.ExpectNoError(framework.WaitForPodNameRunningInNamespace(f.ClientSet, newPod.Name, newPod.Namespace))
+ })
+
+ It("Should fail on mounting non-existent directory 'does-not-exist-dir' when HostPathType is HostPathDirectory", func() {
+ dirPath := path.Join(hostBaseDir, "does-not-exist-dir")
+ testPodHostPathType(f, basePod.Spec.NodeName, dirPath, fmt.Sprintf("%s is not a directory", dirPath), &hostPathDirectory)
It looks like testPodHostPathType is used for failure scenarios. Maybe a better name could be verifyPodHostPathTypeFailure
@dixudx: PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | 0440a17 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or mute the thread.![]()
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: dixudx
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: saad-ali
If they are not already assigned, you can assign the PR to them by writing /assign @saad-ali in a comment when ready.
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
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | b5b0152 | link | /test pull-kubernetes-e2e-kops-aws |
| pull-kubernetes-e2e-gce | b5b0152 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-bazel-test | 06a55cb | link | /test pull-kubernetes-bazel-test |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-kops-aws | a38ddb7 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/test pull-kubernetes-e2e-kops-aws
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | a38ddb7 | link | /test pull-kubernetes-e2e-gce |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/test pull-kubernetes-e2e-gce
@dixudx: The following tests failed, say /retest to rerun them all:
| Test name | Commit | Details | Rerun command |
|---|
| pull-kubernetes-e2e-gce | a38ddb7 | link | /test pull-kubernetes-e2e-gce |
| pull-kubernetes-e2e-kops-aws | a38ddb7 | link | /test pull-kubernetes-e2e-kops-aws |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
—
/lgtm
/retest
Thanks!
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: dixudx, msau42
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: saad-ali
If they are not already assigned, you can assign the PR to them by writing /assign @saad-ali in a comment when ready.
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
—
/assign @saad-ali
@dixudx can you update the title of the PR to reflect that this is fixing an issue too?