@@ -162,14 +162,15 @@ wait_until_deployment_ready() {
162
162
wait_until_deployment_ready aws-load-balancer-controller kube-system
163
163
164
164
function run_ginkgo_test() {
165
+ TEST_RESULT=success
165
166
local focus=$1
166
167
echo " Starting the ginkgo tests from generated ginkgo test binaries with focus: $focus "
167
168
if [ " $IP_FAMILY " == " IPv4" ]; then
168
- (CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --no-color $EXTRA_GINKGO_FLAGS --focus=" $focus " -v --timeout 60m --fail-on-pending $GINKGO_TEST_BUILD /ingress.test -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --test-image-registry=$TEST_IMAGE_REGISTRY --ip-family=$IP_FAMILY || true )
169
- (CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --no-color $EXTRA_GINKGO_FLAGS --focus=" $focus " -v --timeout 60m --fail-on-pending $GINKGO_TEST_BUILD /service.test -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --test-image-registry=$TEST_IMAGE_REGISTRY --ip-family=$IP_FAMILY || true )
169
+ (CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --no-color $EXTRA_GINKGO_FLAGS --focus=" $focus " -v --timeout 60m --fail-on-pending $GINKGO_TEST_BUILD /ingress.test -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --test-image-registry=$TEST_IMAGE_REGISTRY --ip-family=$IP_FAMILY || TEST_RESULT=fail )
170
+ (CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --no-color $EXTRA_GINKGO_FLAGS --focus=" $focus " -v --timeout 60m --fail-on-pending $GINKGO_TEST_BUILD /service.test -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --test-image-registry=$TEST_IMAGE_REGISTRY --ip-family=$IP_FAMILY || TEST_RESULT=fail )
170
171
elif [ " $IP_FAMILY " == " IPv6" ]; then
171
- (CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --no-color $EXTRA_GINKGO_FLAGS --focus=" $focus " --skip=" instance" -v --timeout 60m --fail-on-pending $GINKGO_TEST_BUILD /ingress.test -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --test-image-registry=$TEST_IMAGE_REGISTRY --ip-family=$IP_FAMILY || true )
172
- (CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --no-color $EXTRA_GINKGO_FLAGS --focus=" $focus " --skip=" instance" -v --timeout 60m --fail-on-pending $GINKGO_TEST_BUILD /service.test -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --test-image-registry=$TEST_IMAGE_REGISTRY --ip-family=$IP_FAMILY || true )
172
+ (CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --no-color $EXTRA_GINKGO_FLAGS --focus=" $focus " --skip=" instance" -v --timeout 60m --fail-on-pending $GINKGO_TEST_BUILD /ingress.test -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --test-image-registry=$TEST_IMAGE_REGISTRY --ip-family=$IP_FAMILY || TEST_RESULT=fail )
173
+ (CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --no-color $EXTRA_GINKGO_FLAGS --focus=" $focus " --skip=" instance" -v --timeout 60m --fail-on-pending $GINKGO_TEST_BUILD /service.test -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --test-image-registry=$TEST_IMAGE_REGISTRY --ip-family=$IP_FAMILY || TEST_RESULT=fail )
173
174
else
174
175
echo " Invalid IP_FAMILY input, choose from IPv4 or IPv6 only"
175
176
fi
@@ -195,4 +196,10 @@ if [[ $ADC_REGIONS == *"$REGION"* ]]; then
195
196
else
196
197
kubectl delete -k " github.com/aws/eks-charts/stable/aws-load-balancer-controller//crds?ref=master" --timeout=30m || true
197
198
fi
199
+
200
+ if [[ " $TEST_RESULT " == fail ]]; then
201
+ echo " e2e tests failed."
202
+ exit 1
203
+ fi
204
+
198
205
echo " Successfully finished the test suite $(( $SECONDS / 60 )) minutes and $(( $SECONDS % 60 )) seconds"
0 commit comments