Skip to content

Commit 1c52ce5

Browse files
Create config_test.go
Add basic config test
1 parent 97fb39a commit 1c52ce5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

config/config_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package config
2+
3+
import "testing"
4+
5+
func TestLoadDefaultConfig(t *testing.T) {
6+
cfg := DefaultConfig()
7+
if cfg.HTTPPort == 0 {
8+
t.Fatalf("HTTPPort should be set in default config")
9+
}
10+
if cfg.DataDir == "" {
11+
t.Fatalf("DataDir should not be empty in default config")
12+
}
13+
}

0 commit comments

Comments
 (0)