From a33cbe5c476d07dde7e57f689b126b363f166a04 Mon Sep 17 00:00:00 2001
From: Manuel Kieweg <manuel.kieweg@h-da.de>
Date: Thu, 1 Apr 2021 12:46:26 +0200
Subject: [PATCH] increase integration test logging

---
 build/cd/deploy.go                      | 4 ++--
 build/ci/.terraform-ci.yml              | 3 +++
 build/ci/.test.yml                      | 2 +-
 test/integration/cmdIntegration_test.go | 4 ++++
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/build/cd/deploy.go b/build/cd/deploy.go
index 187b32857..44259a23a 100644
--- a/build/cd/deploy.go
+++ b/build/cd/deploy.go
@@ -311,7 +311,7 @@ func createDeployment(environment, hash string) *appv1.Deployment {
 										Port: intstr.IntOrString{IntVal: 8080},
 									},
 								},
-								InitialDelaySeconds: 20,
+								InitialDelaySeconds: 5,
 								PeriodSeconds:       2,
 							},
 							ReadinessProbe: &corev1.Probe{
@@ -321,7 +321,7 @@ func createDeployment(environment, hash string) *appv1.Deployment {
 										Port: intstr.IntOrString{IntVal: 8080},
 									},
 								},
-								InitialDelaySeconds: 120,
+								InitialDelaySeconds: 10,
 								PeriodSeconds:       2,
 							},
 							ImagePullPolicy: "Always",
diff --git a/build/ci/.terraform-ci.yml b/build/ci/.terraform-ci.yml
index b46b2e421..c8b7f5392 100644
--- a/build/ci/.terraform-ci.yml
+++ b/build/ci/.terraform-ci.yml
@@ -68,4 +68,7 @@ tf:destroy:
   stage: .post
   script:
     - gitlab-terraform destroy
+  needs:
+    - job: apply
+      optional: true
   <<: *tf
\ No newline at end of file
diff --git a/build/ci/.test.yml b/build/ci/.test.yml
index 5970db14d..5cc97d25b 100644
--- a/build/ci/.test.yml
+++ b/build/ci/.test.yml
@@ -12,7 +12,7 @@ integration-test:
     - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
       allow_failure: true
   script:
-    - sleep 1m
+    - sleep 2m
     - go test -race ./test/integration -v -coverprofile=coverage.out
 
 .test: &test
diff --git a/test/integration/cmdIntegration_test.go b/test/integration/cmdIntegration_test.go
index 0b56c9a3d..5649a4449 100644
--- a/test/integration/cmdIntegration_test.go
+++ b/test/integration/cmdIntegration_test.go
@@ -37,18 +37,22 @@ func testSetupIntegration() {
 	a := os.Getenv("GOSDN_TEST_ENDPOINT")
 	if a != "" {
 		testAddress = a
+		log.Infof("GOSDN_TEST_ENDPOINT set to %v", testAddress)
 	}
 	api := os.Getenv("GOSDN_TEST_API_ENDPOINT")
 	if api != "" {
 		testAPIEndpoint = api
+		log.Infof("GOSDN_TEST_API_ENDPOINT set to %v", testAddress)
 	}
 	u := os.Getenv("GOSDN_TEST_USER")
 	if u != "" {
 		testUsername = u
+		log.Infof("GOSDN_TEST_USER set to %v", testAddress)
 	}
 	p := os.Getenv("GOSDN_TEST_PASSWORD")
 	if p != "" {
 		testPassword = p
+		log.Infof("GOSDN_TEST_PASSWORD set to %v", testAddress)
 	}
 
 	gnmiMessages = map[string]pb.Message{
-- 
GitLab