Skip to content
Snippets Groups Projects
Commit cb7ac689 authored by Fabian Seidl's avatar Fabian Seidl
Browse files

Resolve "Config files get changed when running the whole test set"


See merge request !321

Co-authored-by: default avatarAndré Sterba <andre.sterba@stud.h-da.de>
parent 715c4446
Branches
Tags
2 merge requests!321Resolve "Config files get changed when running the whole test set",!264WIP: Develop
Checking pipeline status
# tooling # tooling
build-tools/ **/build-tools/
artifacts/ artifacts/
# containerlab # containerlab
...@@ -9,6 +9,9 @@ clab-gosdn_csbi_arista_base/ ...@@ -9,6 +9,9 @@ clab-gosdn_csbi_arista_base/
# non vimmers # non vimmers
.vscode/ .vscode/
# MacOS
.DS_Store
# test artifacts # test artifacts
coverage.out coverage.out
report.xml report.xml
...@@ -18,10 +21,22 @@ controller/gosdn ...@@ -18,10 +21,22 @@ controller/gosdn
cli/gosdnc cli/gosdnc
csbi/resources/csbi csbi/resources/csbi
# testing and configs # controller
controller/configs/testing-gosdn.toml controller/configs/testing-gosdn.toml
controller/configs/development-gosdn.toml controller/configs/development-gosdn.toml
controller/configs/containerlab-gosdn.toml controller/configs/containerlab-gosdn.toml
**/stores_testing controller/config/*_test.toml
controller/configs/ci-testing-gosdn.toml
config/.gosdnc.toml controller/stores_testing
controller/stores/**
controller/plugins
controller/config/.gosdnc.toml
controller/debug.test
controller/api/api_test.toml
controller/report.xml
controller/test/plugin/**/*.so
controller/nucleus/util/proto/*_test
controller/api/stores_testing/**
controller/northbound/server/stores_testing/**
controller/nucleus/stores_testing/**
controller/nucleus/**/gostructs.go
.vscode/
.vscode/launch.json
.DS_Store
documentation/design-documentation/
documentation/design/*.pdf
*.aux
*.bbl
*.blg
*.lof
*.log
*.out
.idea/gosdn.iml
.idea/modules.xml
.idea/vcs.xml
.idea/workspace.xml
restconf/bin/bin
test/.terraform.local/
configs/gosdn.toml
api/api_test.toml
debug.test
# developer tools
build-tools/
# test files
report.xml
test/plugin/**/*.so
nucleus/util/proto/*_test
# persistent data
**/stores/**
plugins
documentation/figures/~$goSDN-Net-Environment.drawio.dtmp
basepnduuid = "bf8160d4-4659-4a1b-98fd-f409a04111ec"
basesouthboundtype = 1
basesouthbounduuid = "bf8160d4-4659-4a1b-98fd-f409a04111eb"
databaseconnection = "test@test:test"
gosdn_change_timeout = "10m"
basepnduuid = "e3a04432-a5de-4c6a-9d06-cacc0a349b77"
basesouthboundtype = 1
basesouthbounduuid = "94f48ae8-6028-4da0-b495-4c554f886366"
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"testing" "testing"
"time" "time"
"code.fbi.h-da.de/danet/gosdn/controller/config"
"github.com/spf13/viper" "github.com/spf13/viper"
) )
...@@ -16,7 +17,21 @@ const ( ...@@ -16,7 +17,21 @@ const (
configType string = "toml" configType string = "toml"
) )
func TestInit(t *testing.T) {
viper.SetConfigFile("./configs/ci-testing-gosdn.toml")
viper.Set("basePNDUUID", "3e58372e-b53d-41d8-a06e-4131810c8e70")
viper.Set("baseSouthBoundType", 1)
viper.Set("baseSouthBoundUUID", "73b30205-7ad9-48fb-8251-0dbef649ce01")
}
func TestRun(t *testing.T) { func TestRun(t *testing.T) {
TestInit(t)
err := config.InitializeConfig()
if err != nil {
t.Error(err)
return
}
type args struct { type args struct {
request string request string
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment