MCPcopy Index your code
hub / github.com/kataras/iris / TestConfigurationOptionsDeep

Function TestConfigurationOptionsDeep

configuration_test.go:76–91  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestConfigurationOptionsDeep(t *testing.T) {
77 charset := "MYCHARSET"
78
79 app := New().Configure(WithCharset(charset), WithoutBodyConsumptionOnUnmarshal, WithoutBanner)
80
81 expected := DefaultConfiguration()
82 expected.Charset = charset
83 expected.DisableBodyConsumptionOnUnmarshal = true
84 expected.DisableStartupLog = true
85
86 has := *app.config
87
88 if !reflect.DeepEqual(has, expected) {
89 t.Fatalf("DEEP configuration is not the same after New expected:\n %#v \ngot:\n %#v", expected, has)
90 }
91}
92
93func createGlobalConfiguration(t *testing.T) {
94 filename := homeConfigurationFilename(".yml")

Callers

nothing calls this directly

Calls 6

WithCharsetFunction · 0.85
DeepEqualMethod · 0.80
FatalfMethod · 0.80
NewFunction · 0.70
DefaultConfigurationFunction · 0.70
ConfigureMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…