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

temp move because of import loop

parent 7fd48ec6
No related branches found
No related tags found
2 merge requests!110Integration test,!90Develop
Pipeline #66356 passed with warnings
...@@ -2,7 +2,6 @@ package main ...@@ -2,7 +2,6 @@ package main
import ( import (
"code.fbi.h-da.de/cocsn/gosdn/nucleus" "code.fbi.h-da.de/cocsn/gosdn/nucleus"
"code.fbi.h-da.de/cocsn/gosdn/test"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"os" "os"
) )
...@@ -21,6 +20,6 @@ func main() { ...@@ -21,6 +20,6 @@ func main() {
if !integrationTest { if !integrationTest {
nucleus.StartAndRun(IsRunningChannel) nucleus.StartAndRun(IsRunningChannel)
} else { } else {
test.IntegrationTests() nucleus.IntegrationTests()
} }
} }
package test package nucleus
import ( import (
"code.fbi.h-da.de/cocsn/gosdn/forks/goarista/gnmi" "code.fbi.h-da.de/cocsn/gosdn/forks/goarista/gnmi"
"code.fbi.h-da.de/cocsn/gosdn/nucleus"
"context" "context"
"github.com/google/uuid" "github.com/google/uuid"
gpb "github.com/openconfig/gnmi/proto/gnmi" gpb "github.com/openconfig/gnmi/proto/gnmi"
...@@ -11,15 +10,15 @@ import ( ...@@ -11,15 +10,15 @@ import (
) )
func IntegrationTests() { func IntegrationTests() {
sbi := &nucleus.OpenConfig{} sbi := &OpenConfig{}
device := &nucleus.Device{ device := &Device{
GoStruct: sbi.Schema().Root, GoStruct: sbi.Schema().Root,
SBI: sbi, SBI: sbi,
Config: nucleus.DeviceConfig{ Config: DeviceConfig{
Uuid: uuid.New(), Uuid: uuid.New(),
}, },
} }
pnd, err := nucleus.NewPND("openconfig", "test description", sbi) pnd, err := NewPND("openconfig", "test description", sbi)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
...@@ -33,7 +32,7 @@ func IntegrationTests() { ...@@ -33,7 +32,7 @@ func IntegrationTests() {
Password: "admin", Password: "admin",
Encoding: gpb.Encoding_JSON_IETF, Encoding: gpb.Encoding_JSON_IETF,
} }
transport, err := nucleus.NewGnmiTransport(cfg) transport, err := NewGnmiTransport(cfg)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment