Skip to content
Snippets Groups Projects

Process response overhaul

Merged Ghost User requested to merge process-response-overhaul into develop
6 files
+ 275
191
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -4,6 +4,7 @@ import (
"os"
"testing"
"code.fbi.h-da.de/cocsn/api/go/gosdn/pnd"
tpb "code.fbi.h-da.de/cocsn/api/go/gosdn/transport"
"code.fbi.h-da.de/cocsn/gosdn/nucleus/util/proto"
guuid "github.com/google/uuid"
@@ -110,7 +111,7 @@ func TestApiIntegration(t *testing.T) {
cliPnd := viper.GetString("CLI_PND")
cliSbi := viper.GetString("CLI_SBI")
if _, err := AddDevice(
if _, err := addDevice(
testAPIEndpoint,
testUsername,
testPassword,
@@ -124,7 +125,7 @@ func TestApiIntegration(t *testing.T) {
}
did := viper.GetString("LAST_DEVICE_UUID")
_, err := GetDevice(
_, err := getDevice(
testAPIEndpoint,
cliPnd,
testPath,
@@ -135,7 +136,7 @@ func TestApiIntegration(t *testing.T) {
return
}
_, err = GetDevice(
_, err = getDevice(
testAPIEndpoint,
cliPnd,
"",
@@ -147,19 +148,20 @@ func TestApiIntegration(t *testing.T) {
}
hostname := guuid.New().String()
_, err = Update(
_, err = changeRequest(
testAPIEndpoint,
did,
cliPnd,
testPath,
hostname,
pnd.ApiOperation_UPDATE,
)
if (err != nil) != tt.wantErr {
t.Errorf("gosdn cli set error = %v, wantErr %v", err, tt.wantErr)
return
}
resp, err := GetDevice(testAddress, testUsername, testPassword, testPath)
resp, err := getDevice(testAddress, testUsername, testPassword, testPath)
if err != nil {
if !tt.wantErr {
t.Errorf("Get() error = %v, wantErr %v", err, tt.wantErr)
Loading