Commit 33beb087 authored by Vijay Kumar Chauhan's avatar Vijay Kumar Chauhan
Browse files

Test case for InitConfigData

parent 76fede65
Branches
Tags v1.2.5
2 merge requests!54Devbranch,!50Init config data
Showing with 8 additions and 0 deletions
package configmdl
import (
"io/ioutil"
"testing"
"corelab.mkcl.org/MKCLOS/coredevelopmentplatform/corepkgv2/errormdl"
......@@ -21,6 +22,13 @@ func TestInitConfig(t *testing.T) {
assert.True(t, config.Name == "github.com/OneOfOne/xxhash", "this should not throw error")
}
func TestInitConfigData(t *testing.T) {
var config tomlConfig
ba, _ := ioutil.ReadFile("../testingdata/testData/config/config.toml")
InitConfigData(ba, &config)
assert.True(t, config.Name == "github.com/OneOfOne/xxhash", "this should not throw error")
}
func TestSaveConfig(t *testing.T) {
var config tomlConfig
InitConfig("../testingdata/testData/config/config.toml", &config)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment