From 550b203550b3914deaf83a73469b101eacb12883 Mon Sep 17 00:00:00 2001 From: Manuel Kieweg <manuel.kieweg@h-da.de> Date: Tue, 15 Jun 2021 09:52:23 +0000 Subject: [PATCH] Resolve "Job Failed #276418" --- api/apiIntegration_test.go | 18 +----------------- build/cd/deploy.go | 3 --- build/ci/.test.yml | 13 +++---------- 3 files changed, 4 insertions(+), 30 deletions(-) diff --git a/api/apiIntegration_test.go b/api/apiIntegration_test.go index 35475bc98..467a20786 100644 --- a/api/apiIntegration_test.go +++ b/api/apiIntegration_test.go @@ -1,7 +1,6 @@ package api import ( - "fmt" "os" "testing" @@ -17,8 +16,6 @@ import ( const unreachable = "203.0.113.10:6030" const testPath = "/system/config/hostname" -var testIP = "141.100.70.171" -var testPort = "6030" var testAddress = testIP + ":" + testPort var testAPIEndpoint = "gosdn-latest.apps.ocp.fbi.h-da.de" var testUsername = "admin" @@ -41,20 +38,7 @@ func testSetupIntegration() { log.SetLevel(log.PanicLevel) } - a := os.Getenv("GOSDN_TEST_ENDPOINT_IP") - if a != "" { - testIP = a - log.Infof("GOSDN_TEST_ENDPOINT_IP set to %v", testIP) - } - port := os.Getenv("GOSDN_TEST_ENDPOINT_PORT") - if port != "" { - testPort = port - log.Infof("GOSDN_TEST_ENDPOINT_PORT set to %v", testPort) - } - testAddress = testIP + ":" + testPort - fmt.Printf("Testadress: %s, Testport: %s, Port: %s", testAddress, testPort, port) - - api := os.Getenv("GOSDN_TEST_API_ENDPOINT") + api := viper.GetString("GOSDN_TEST_API_ENDPOINT") if api != "" { testAPIEndpoint = api log.Infof("GOSDN_TEST_API_ENDPOINT set to %v", testAPIEndpoint) diff --git a/build/cd/deploy.go b/build/cd/deploy.go index 45b3b0998..f70884724 100644 --- a/build/cd/deploy.go +++ b/build/cd/deploy.go @@ -244,9 +244,6 @@ func createService(environment string) *corev1.Service { Name: environment, Namespace: "cocsn", Labels: map[string]string{"run": environment}, - Annotations: map[string]string{ - "metallb.universe.tf/address-pool": "hdanet", - }, OwnerReferences: []metav1.OwnerReference{ { APIVersion: "v1", diff --git a/build/ci/.test.yml b/build/ci/.test.yml index 4af5c562e..d5df26647 100644 --- a/build/ci/.test.yml +++ b/build/ci/.test.yml @@ -25,13 +25,15 @@ integration-test:nucleus: <<: *integration-test script: + - ./build/ci/generate_port.sh $CI_PIPELINE_ID >> port + - export GOSDN_TEST_ENDPOINT_PORT=$(cat port) - cd ./test/integration - go test -race -v -run TestGnmi_SetIntegration - go test -race -v -run TestGnmi_GetIntegration - go test -race -v -run TestGnmi_SubscribeIntegration - go test -race -v -run TestGnmi_CapabilitiesIntegration -integration-test:cmd: +integration-test:api: <<: *integration-test variables: K8S_OP: "getenv" @@ -42,15 +44,6 @@ integration-test:cmd: - job: "build:k8s-bot" artifacts: true script: - - cd ./test/integration - - ./../../build/cd/k8s-bot - - go test -race -v -run TestCmdIntegration - -integration-test:cli: - <<: *integration-test - script: - - ./build/ci/generate_port.sh $CI_PIPELINE_ID >> port - - export GOSDN_TEST_ENDPOINT_PORT=$(cat port) - cd ./api - go test -race -v -run TestApiIntegration -- GitLab