INNER CODE UNIT · Go

TestSetKeyToConfig

GGP1/kure · auth/auth_test.go:246

func TestSetKeyToConfig(t *testing.T) {
	defer config.Reset()

	key := []byte("test")
	setKeyToConfig(key)

	got := config.Get(authKey).(map[string]interface{})
	gotKey, ok := got["key"].([]byte)

	assert.True(t, ok)
	assert.Equal(t, key, gotKey)
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…