@@ -18,11 +18,13 @@ IMAGE=${ECR_URL}/${IMAGE_NAME}
1818
1919
2020CLUSTER_NAME_BASE=" test"
21+ CLUSTER_NAME=" "
2122K8S_VERSION=" 1.17"
2223TMP_DIR=" "
2324
2425source " $SCRIPTS_DIR /lib/aws.sh"
2526source " $SCRIPTS_DIR /lib/common.sh"
27+ source " $SCRIPTS_DIR /lib/k8s.sh"
2628
2729check_is_installed curl
2830check_is_installed docker
@@ -56,8 +58,26 @@ function build_and_publish_controller {
5658 echo " ok."
5759}
5860
59- function run_integration_tests {
60- echo " Not implemented"
61+ function install_controller {
62+ echo -n " installing appmesh controller ... "
63+ local __controller_name=" appmesh-controller"
64+ local __ns=" appmesh-system"
65+ AWS_ACCOUNT=$AWS_ACCOUNT_ID AWS_REGION=$AWS_REGION make deploy
66+ check_deployment_rollout $__controller_name $__ns
67+ echo -n " check the pods in appmesh-system namespace ... "
68+ kubectl get pod -n $__ns
69+ echo " ok."
70+
71+ }
72+
73+ function run_integration_test {
74+ local __type=$1
75+ local __vpc_id=$( vpc_id )
76+ echo -n " running integration test type $__type ... "
77+ ginkgo -v -r test/integration/$__type -- --cluster-kubeconfig=${KUBECONFIG} \
78+ --cluster-name=${CLUSTER_NAME} --aws-region=${AWS_REGION} \
79+ --aws-vpc-id=$__vpc_id
80+ echo " ok."
6181}
6282
6383function clean_up {
@@ -89,5 +109,19 @@ install_crds
89109# Install cert-manager
90110$SCRIPTS_DIR /install-cert-manager.sh
91111
112+ # Install the controller
113+ install_controller
114+
92115# Show the installed CRDs
93116kubectl get crds
117+
118+ # FIXME sometimes the test controller "deployment" is ready but internally process is not ready
119+ # leading to tests failing. Added this hack to workaround. Will be replaced with a better
120+ # check later
121+ sleep 15
122+
123+ # Run integration tests
124+ run_integration_test mesh
125+ run_integration_test virtualservice
126+ run_integration_test virtualrouter
127+ run_integration_test gatewayroute
0 commit comments