Debian Codegraph @

remotessh_test.go

raw
1 package desync
2
3 import (
4 "net/url"
5 "testing"
6
7 "github.com/stretchr/testify/require"
8 )
9
10 func TestRemoteSSHStoreRejectsEncryption(t *testing.T) {
11 u, err := url.Parse("ssh://host/store")
12 require.NoError(t, err)
13
14 // The casync protocol doesn't support encryption, configuring it on an
15 // ssh store needs to fail rather than being silently ignored
16 _, err = NewRemoteSSHStore(u, StoreOptions{Encryption: true, EncryptionKey: testEncryptionKey})
17 require.ErrorContains(t, err, "not supported")
18 }