VOL-2084 - modifiy test file reference to use relative path
Change-Id: Ifd8b28943702f37106d97383caf67209db01ccca
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2b29f27
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+tests
diff --git a/internal/pkg/afrouter/config_test.go b/internal/pkg/afrouter/config_test.go
index c11d01d..5d68654 100644
--- a/internal/pkg/afrouter/config_test.go
+++ b/internal/pkg/afrouter/config_test.go
@@ -32,7 +32,13 @@
config := Configuration{}
cmdParse := flag.NewFlagSet(path.Base(os.Args[0]), flag.ContinueOnError)
- confFilePath = fmt.Sprintf("%s/src/github.com/opencord/voltha-api-server/arouter.json", os.Getenv("GOPATH"))
+
+ /*
+ * The test code is run in the context (path) the package under test,
+ * as such the "PWD" is "$BASE/internal/pkg/afrouter". The config being
+ * used for testing is 3 directories up.
+ */
+ confFilePath = "../../../arouter.json"
config.ConfigFile = cmdParse.String("config", confFilePath, "The configuration file for the affinity router")
return &config