diff --git a/api/apiIntegration_test.go b/api/apiIntegration_test.go index 35475bc98c6e6ed305b117854946f8e41a36f0d2..467a2078621e7dccd704208a4e91d0c82ca8e4b0 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 45b3b0998d8017bb1d1af6504bc0956eaa1fbe60..f708847243c4a52f873d7984b4d2b417f2d0dfad 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 4af5c562e81006edf8758d781a69e9cdba840773..d5df2664742bbf43df7c200d30ccf0e9a62b721b 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