Skip to content
Snippets Groups Projects
Commit 550b2035 authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

Resolve "Job Failed #276418"

parent 76034e44
No related branches found
No related tags found
9 merge requests!246Develop,!245Develop into Master,!244Master into develop2 into master,!219Draft: Testing,!214Test pipelines,!195DO NOT MERGE 2,!194DO NOT MERGE! just for testing,!164Resolve "Job Failed #276418",!138Develop
package api package api
import ( import (
"fmt"
"os" "os"
"testing" "testing"
...@@ -17,8 +16,6 @@ import ( ...@@ -17,8 +16,6 @@ import (
const unreachable = "203.0.113.10:6030" const unreachable = "203.0.113.10:6030"
const testPath = "/system/config/hostname" const testPath = "/system/config/hostname"
var testIP = "141.100.70.171"
var testPort = "6030"
var testAddress = testIP + ":" + testPort var testAddress = testIP + ":" + testPort
var testAPIEndpoint = "gosdn-latest.apps.ocp.fbi.h-da.de" var testAPIEndpoint = "gosdn-latest.apps.ocp.fbi.h-da.de"
var testUsername = "admin" var testUsername = "admin"
...@@ -41,20 +38,7 @@ func testSetupIntegration() { ...@@ -41,20 +38,7 @@ func testSetupIntegration() {
log.SetLevel(log.PanicLevel) log.SetLevel(log.PanicLevel)
} }
a := os.Getenv("GOSDN_TEST_ENDPOINT_IP") api := viper.GetString("GOSDN_TEST_API_ENDPOINT")
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")
if api != "" { if api != "" {
testAPIEndpoint = api testAPIEndpoint = api
log.Infof("GOSDN_TEST_API_ENDPOINT set to %v", testAPIEndpoint) log.Infof("GOSDN_TEST_API_ENDPOINT set to %v", testAPIEndpoint)
......
...@@ -244,9 +244,6 @@ func createService(environment string) *corev1.Service { ...@@ -244,9 +244,6 @@ func createService(environment string) *corev1.Service {
Name: environment, Name: environment,
Namespace: "cocsn", Namespace: "cocsn",
Labels: map[string]string{"run": environment}, Labels: map[string]string{"run": environment},
Annotations: map[string]string{
"metallb.universe.tf/address-pool": "hdanet",
},
OwnerReferences: []metav1.OwnerReference{ OwnerReferences: []metav1.OwnerReference{
{ {
APIVersion: "v1", APIVersion: "v1",
......
...@@ -25,13 +25,15 @@ ...@@ -25,13 +25,15 @@
integration-test:nucleus: integration-test:nucleus:
<<: *integration-test <<: *integration-test
script: script:
- ./build/ci/generate_port.sh $CI_PIPELINE_ID >> port
- export GOSDN_TEST_ENDPOINT_PORT=$(cat port)
- cd ./test/integration - cd ./test/integration
- go test -race -v -run TestGnmi_SetIntegration - go test -race -v -run TestGnmi_SetIntegration
- go test -race -v -run TestGnmi_GetIntegration - go test -race -v -run TestGnmi_GetIntegration
- go test -race -v -run TestGnmi_SubscribeIntegration - go test -race -v -run TestGnmi_SubscribeIntegration
- go test -race -v -run TestGnmi_CapabilitiesIntegration - go test -race -v -run TestGnmi_CapabilitiesIntegration
integration-test:cmd: integration-test:api:
<<: *integration-test <<: *integration-test
variables: variables:
K8S_OP: "getenv" K8S_OP: "getenv"
...@@ -42,15 +44,6 @@ integration-test:cmd: ...@@ -42,15 +44,6 @@ integration-test:cmd:
- job: "build:k8s-bot" - job: "build:k8s-bot"
artifacts: true artifacts: true
script: 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 - cd ./api
- go test -race -v -run TestApiIntegration - go test -race -v -run TestApiIntegration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment