Skip to content
Snippets Groups Projects

Process response overhaul

Merged Ghost User requested to merge process-response-overhaul into develop
Files
25
+ 10
6
@@ -39,8 +39,14 @@ func TestApiIntegration(t *testing.T) {
@@ -39,8 +39,14 @@ func TestApiIntegration(t *testing.T) {
cliPnd := viper.GetString("CLI_PND")
cliPnd := viper.GetString("CLI_PND")
cliSbi := viper.GetString("CLI_SBI")
cliSbi := viper.GetString("CLI_SBI")
cliPndUUID, err := uuid.Parse(cliPnd)
suid, err := uuid.Parse(cliSbi)
clisbiUUID, err := uuid.Parse(cliSbi)
if err != nil {
 
t.Error(err)
 
}
 
puid, err := uuid.Parse(cliPnd)
 
if err != nil {
 
t.Error(err)
 
}
opt := &tpb.TransportOption{
opt := &tpb.TransportOption{
Address: testAddress,
Address: testAddress,
@@ -50,13 +56,12 @@ func TestApiIntegration(t *testing.T) {
@@ -50,13 +56,12 @@ func TestApiIntegration(t *testing.T) {
GnmiTransportOption: &tpb.GnmiTransportOption{},
GnmiTransportOption: &tpb.GnmiTransportOption{},
},
},
}
}
if _, err := addDevice(
if _, err := addDevice(
testAPIEndpoint,
testAPIEndpoint,
"test-device",
"test-device",
opt,
opt,
clisbiUUID,
suid,
cliPndUUID,
puid,
); (err != nil) != tt.wantErr {
); (err != nil) != tt.wantErr {
t.Errorf("gosdn cli add-device error = %v, wantErr %v", err, tt.wantErr)
t.Errorf("gosdn cli add-device error = %v, wantErr %v", err, tt.wantErr)
return
return
@@ -66,7 +71,6 @@ func TestApiIntegration(t *testing.T) {
@@ -66,7 +71,6 @@ func TestApiIntegration(t *testing.T) {
_, err = getDevice(
_, err = getDevice(
testAPIEndpoint,
testAPIEndpoint,
cliPnd,
cliPnd,
testPath,
did,
did,
)
)
if (err != nil) != tt.wantErr {
if (err != nil) != tt.wantErr {
Loading