INNER CODE UNIT · Go

TestCombineKeysErrors

GGP1/kure · auth/auth_test.go:200

func TestCombineKeysErrors(t *testing.T) {
	config.Set("keyfile.path", "non-existent")

	_, err := combineKeys(nil, memguard.NewEnclave([]byte("test")))
	assert.Error(t, err)

	t.Run("Invalid path", func(t *testing.T) {
		config.Reset()
		_, err := combineKeys(bytes.NewBufferString("\n"), nil)
		assert.Error(t, err)
	})
}

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

	expPassword := memguard.NewEnclave([]byte("test"))
	const (

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…