Skip to content
Snippets Groups Projects

Process response overhaul

Merged Ghost User requested to merge process-response-overhaul into develop
3 files
+ 4
30
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 1
17
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)
Loading