(t *testing.T)
| 139 | } |
| 140 | |
| 141 | func TestConfigDefaults(t *testing.T) { |
| 142 | t.Parallel() |
| 143 | a := assertions.New(t) |
| 144 | |
| 145 | config := InitializeWithDefaults("test", "test", defaults) |
| 146 | a.So(config, should.NotBeNil) |
| 147 | |
| 148 | settings := new(example) |
| 149 | |
| 150 | // parse no command line args |
| 151 | err := config.Parse() |
| 152 | a.So(err, should.BeNil) |
| 153 | |
| 154 | // unmarshal |
| 155 | err = config.Unmarshal(settings) |
| 156 | a.So(err, should.BeNil) |
| 157 | |
| 158 | a.So(settings, should.Resemble, defaults) |
| 159 | } |
| 160 | |
| 161 | func TestConfigEnv(t *testing.T) { //nolint:paralleltest // Parallel tests conflict with t.Setenv. |
| 162 | a := assertions.New(t) |
nothing calls this directly
no test coverage detected