diff --git a/test/pod_test.go b/test/pod_test.go index f7be8106a54a14bd75affa694047b182bffdbd9f..6e78d2e6fab894d4e037a1aa8680b314b5252871 100644 --- a/test/pod_test.go +++ b/test/pod_test.go @@ -1,3 +1,4 @@ +//go:build e2e // +build e2e package test @@ -6,9 +7,9 @@ import ( "fmt" "github.com/kelseyhightower/envconfig" "github.com/stretchr/testify/suite" + "strings" "testing" "time" - "strings" ) const ( @@ -89,6 +90,12 @@ func (p *PodTestSuite) TestPodWithLocalVolume() { runTest(p, []string{p.config.IMAGE}, "ready", localVolumeType) } +func (p *PodTestSuite) TestPodWithLocalVolumeDefault() { + p.kustomizeDir = "pod-with-default-local-volume" + + runTest(p, []string{p.config.IMAGE}, "ready", localVolumeType) +} + func (p *PodTestSuite) TestPodWithNodeAffinity() { p.kustomizeDir = "pod-with-node-affinity" diff --git a/test/testdata/pod-with-default-local-volume/kustomization.yaml b/test/testdata/pod-with-default-local-volume/kustomization.yaml new file mode 100644 index 0000000000000000000000000000000000000000..43eb7c040a3a6ff83b8d465b2a3b4b6d3311218f --- /dev/null +++ b/test/testdata/pod-with-default-local-volume/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ../../../deploy +- ../../../examples/pod +patches: +- path: patch.yaml +commonLabels: + app: local-path-provisioner +images: +- name: rancher/local-path-provisioner + newTag: dev diff --git a/test/testdata/pod-with-default-local-volume/patch.yaml b/test/testdata/pod-with-default-local-volume/patch.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b00f15d91f4e4df01aaf7b937f46ab65566ec9e2 --- /dev/null +++ b/test/testdata/pod-with-default-local-volume/patch.yaml @@ -0,0 +1,9 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: local-path + annotations: + defaultVolumeType: local +provisioner: rancher.io/local-path +reclaimPolicy: Delete +volumeBindingMode: WaitForFirstConsumer \ No newline at end of file