Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
MKCLOS
Core Development Platform
corepkgv2
Commits
33beb087
Commit
33beb087
authored
6 years ago
by
Vijay Kumar Chauhan
Browse files
Options
Downloads
Patches
Plain Diff
Test case for InitConfigData
parent
76fede65
Branches
Branches containing commit
Tags
v1.2.5
Tags containing commit
2 merge requests
!54
Devbranch
,
!50
Init config data
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configmdl/configmdl_test.go
+8
-0
configmdl/configmdl_test.go
with
8 additions
and
0 deletions
configmdl/configmdl_test.go
+
8
−
0
View file @
33beb087
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets