From 27ebe388c8df504ea6293c95b74029c76f6f334a Mon Sep 17 00:00:00 2001 From: Daniel Turner Date: Fri, 27 Sep 2019 13:32:18 -0700 Subject: [PATCH] Set PVs count to match parallelism --- test/fixtures/hello-cloud/redis.yml | 2 +- test/fixtures/pvc/pvc.yml | 4 ++-- test/helpers/test_provisioner.rb | 3 +-- test/integration/kubernetes_deploy_test.rb | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/test/fixtures/hello-cloud/redis.yml b/test/fixtures/hello-cloud/redis.yml index cca361cef..6db5908d0 100644 --- a/test/fixtures/hello-cloud/redis.yml +++ b/test/fixtures/hello-cloud/redis.yml @@ -57,7 +57,7 @@ spec: - ReadWriteOnce resources: requests: - storage: 1M + storage: 100M --- apiVersion: apps/v1beta1 kind: Deployment diff --git a/test/fixtures/pvc/pvc.yml b/test/fixtures/pvc/pvc.yml index d529e76a3..cb844ef55 100644 --- a/test/fixtures/pvc/pvc.yml +++ b/test/fixtures/pvc/pvc.yml @@ -9,7 +9,7 @@ spec: - ReadWriteOnce resources: requests: - storage: 1M + storage: 150Mi storageClassName: k8s-deploy-test volumeMode: Filesystem --- @@ -22,5 +22,5 @@ spec: - ReadWriteOnce resources: requests: - storage: 1M + storage: 150Mi volumeMode: Filesystem diff --git a/test/helpers/test_provisioner.rb b/test/helpers/test_provisioner.rb index 6b270b3d9..11e8ae32d 100644 --- a/test/helpers/test_provisioner.rb +++ b/test/helpers/test_provisioner.rb @@ -9,8 +9,7 @@ class << self def prepare_cluster WebMock.allow_net_connect! $stderr.print("Preparing test cluster... ") - prepare_pv("pv0001") - prepare_pv("pv0002") + [ENV['PARALLELISM'].to_i, 2].max.times { |i| prepare_pv("pv000#{i}") } $stderr.puts "Done." WebMock.disable_net_connect! end diff --git a/test/integration/kubernetes_deploy_test.rb b/test/integration/kubernetes_deploy_test.rb index 7b32b3e2b..f9c93e5ba 100644 --- a/test/integration/kubernetes_deploy_test.rb +++ b/test/integration/kubernetes_deploy_test.rb @@ -1522,7 +1522,6 @@ def test_pvc_immediate_bind sc["volumeBindingMode"] = "Immediate" end assert_deploy_success(result) - TestProvisioner.prepare_pv(pvname, storage_class_name: storage_class_name) result = deploy_fixtures("pvc", subset: ["pvc.yml"]) do |fixtures| pvc = fixtures["pvc.yml"]["PersistentVolumeClaim"].first