Skip to content

Commit

Permalink
Optimise volume creation for vol-attach-tests (#94)
Browse files Browse the repository at this point in the history
* Optimise volume creation for vol-attach-tests

Signed-off-by: Ambika Nair <[email protected]>

* Optimise volume creation for vol-attach-tests

Signed-off-by: Ambika Nair <[email protected]>

* Fix bugs

Signed-off-by: Ambika Nair <[email protected]>

* Review comments

Signed-off-by: Ambika Nair <[email protected]>

* Review comments

Signed-off-by: Ambika Nair <[email protected]>

---------

Signed-off-by: Ambika Nair <[email protected]>
  • Loading branch information
ambiknai authored Sep 25, 2023
1 parent e3df68d commit 6efb4bc
Show file tree
Hide file tree
Showing 3 changed files with 329 additions and 456 deletions.
5 changes: 4 additions & 1 deletion tests/e2e/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ while [[ $# -gt 0 ]]; do
esac
done

export E2E_ZONE=$REGION-1

if [[ "$IC_LOGIN" == "true" ]]; then
echo "Kube Config already exported!!!"
fi
Expand Down Expand Up @@ -148,7 +150,8 @@ echo "Exit status for resize volume test: $rc3"

set -x
VA_ADDON_VERSION=5.2
compare=`echo | awk "{ print ($CLUSTER_ADDON_VER >= $VA_ADDON_VERSION)?1 : 0 }"`
CLUSTER_ADDON_MAJOR=$(echo "$CLUSTER_ADDON_VER" | awk -F'.' '{print $1"."$2}')
compare=`echo | awk "{ print ($CLUSTER_ADDON_MAJOR >= $VA_ADDON_VERSION)?1 : 0 }"`
echo $compare
if [[ $compare -eq 1 ]]; then
ginkgo -v --focus="\[ics-e2e\] \[volume-attachment-limit\] \[default\]" ./tests/e2e
Expand Down
16 changes: 8 additions & 8 deletions tests/e2e/pvc_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var _ = Describe("[ics-e2e] [sc] [with-deploy] Dynamic Provisioning for all SC w
},
}
test.Run(cs, ns)
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: 5iops SC DEPLOYMENT Test: PASS\n"); err != nil {
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: 5IOPS SC DEPLOYMENT TEST: PASS\n"); err != nil {
panic(err)
}
})
Expand Down Expand Up @@ -143,7 +143,7 @@ var _ = Describe("[ics-e2e] [sc] [with-deploy] Dynamic Provisioning for all SC w
},
}
test.Run(cs, ns)
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: GP SC DEPLOYMENT Test: PASS\n"); err != nil {
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: GP SC DEPLOYMENT TEST: PASS\n"); err != nil {
panic(err)
}
})
Expand Down Expand Up @@ -210,7 +210,7 @@ var _ = Describe("[ics-e2e] [sc] [with-pods] Dynamic Provisioning for all SC wit
},
}
test.Run(cs, ns)
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: 5iops SC POD Test: PASS\n"); err != nil {
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: 5IOPS SC POD TEST: PASS\n"); err != nil {
panic(err)
}
})
Expand Down Expand Up @@ -256,7 +256,7 @@ var _ = Describe("[ics-e2e] [sc] [with-pods] Dynamic Provisioning for all SC wit
},
}
test.Run(cs, ns)
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: GP SC POD Test: PASS\n"); err != nil {
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: GP SC POD TEST: PASS\n"); err != nil {
panic(err)
}
})
Expand Down Expand Up @@ -307,7 +307,7 @@ var _ = Describe("[ics-e2e] [sc] [with-pods] Dynamic Provisioning for all SC wit
},
}
test.Run(cs, ns)
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: Custom SC Pod Test: PASS\n"); err != nil {
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: CUSTOM SC POD TEST: PASS\n"); err != nil {
panic(err)
}
})
Expand Down Expand Up @@ -371,7 +371,7 @@ var _ = Describe("[ics-e2e] [sc] [with-statefulset] Dynamic Provisioning using s
ServiceName: service.Name,
}
test.Run(cs, ns, false)
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: With Statefulsets: PASS\n"); err != nil {
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: WITH STATEFULSETS: PASS\n"); err != nil {
panic(err)
}
})
Expand Down Expand Up @@ -435,7 +435,7 @@ var _ = Describe("[ics-e2e] [node-drain] [with-pods] Dynamic Provisioning using
ServiceName: service.Name,
}
test.Run(cs, ns, true)
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: Cordon and Drain Node: PASS\n"); err != nil {
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: CORDON AND DRAIN NODE: PASS\n"); err != nil {
panic(err)
}
})
Expand Down Expand Up @@ -504,7 +504,7 @@ var _ = Describe("[ics-e2e] [resize] [pv] Dynamic Provisioning and resize pv", f
ExpandedSize: 1900,
}
test.Run(cs, ns)
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: 5iops SC POD Test and resize volume: PASS\n"); err != nil {
if _, err = fpointer.WriteString("VPC-BLK-CSI-TEST: 5IOPS SC POD TEST AND RESIZE VOLUME: PASS\n"); err != nil {
panic(err)
}
})
Expand Down
Loading

0 comments on commit 6efb4bc

Please sign in to comment.