func TestHttp_configsSettingHeaders(t *testing.T) { http := HttpModForTests() config := new(config.Http) // Assign config vars config.Send_headers = []string{"a", "b", "c"} // Set config http.SetFromConfig(*config) // Check if http config is set correctly assert.True(t, http.Send_headers) assert.Equal(t, len(config.Send_headers), len(http.Headers_whitelist)) for _, val := range http.Headers_whitelist { assert.True(t, val) } }