More UTs added 28/6428/1 dawn
authorMohamed Abukar <abukar.mohamed@nokia.com>
Thu, 24 Jun 2021 14:07:28 +0000 (14:07 +0000)
committerMohamed Abukar <abukar.mohamed@nokia.com>
Thu, 24 Jun 2021 14:07:32 +0000 (14:07 +0000)
Change-Id: Idae7b4de736ae2e941debb787c16e6c2ac77ff28
Signed-off-by: Mohamed Abukar <abukar.mohamed@nokia.com>
pkg/xapp/xapp_test.go

index 2c4c4fe..8b2a952 100755 (executable)
@@ -21,6 +21,7 @@ package xapp
 
 import (
        "bytes"
+       "io/ioutil"
        "net/http"
        "net/http/httptest"
        "os"
@@ -434,6 +435,16 @@ func TestappconfigHandler(t *testing.T) {
        executeRequest(req, handleFunc)
 }
 
+func TestConfigChange(t *testing.T) {
+       Logger.Error("CASE: TestConfigChange: %s", os.Getenv("CFG_FILE"))
+
+       input, err := ioutil.ReadFile(os.Getenv("CFG_FILE"))
+       assert.Equal(t, err, nil)
+
+       err = ioutil.WriteFile(os.Getenv("CFG_FILE"), input, 0644)
+       assert.Equal(t, err, nil)
+}
+
 func TestRegisterXapp(t *testing.T) {
        Logger.Error("CASE: TestRegisterXapp")
        doRegister()