File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/test/java/org/cryptomator/linux/keychain Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -52,32 +52,33 @@ public void testIsSupported() {
5252 class FunctionalTests {
5353
5454 static final String KEY_ID = "cryptomator-test-" + UUID .randomUUID ();
55- final SecretServiceKeychainAccess keyring = new SecretServiceKeychainAccess ();
55+ final static SecretServiceKeychainAccess KEYRING = new SecretServiceKeychainAccess ();
5656
5757 @ Test
5858 @ Order (1 )
5959 public void testStore () throws KeychainAccessException {
60- keyring .storePassphrase (KEY_ID , "cryptomator-test" , "p0ssw0rd" );
60+ KEYRING .isSupported (); // ensure encrypted session
61+ KEYRING .storePassphrase (KEY_ID , "cryptomator-test" , "p0ssw0rd" );
6162 }
6263
6364 @ Test
6465 @ Order (2 )
6566 public void testLoad () throws KeychainAccessException {
66- var passphrase = keyring .loadPassphrase (KEY_ID );
67+ var passphrase = KEYRING .loadPassphrase (KEY_ID );
6768 Assertions .assertNotNull (passphrase );
6869 Assertions .assertEquals ("p0ssw0rd" , String .copyValueOf (passphrase ));
6970 }
7071
7172 @ Test
7273 @ Order (3 )
7374 public void testDelete () throws KeychainAccessException {
74- keyring .deletePassphrase (KEY_ID );
75+ KEYRING .deletePassphrase (KEY_ID );
7576 }
7677
7778 @ Test
7879 @ Order (4 )
7980 public void testLoadNotExisting () throws KeychainAccessException {
80- var result = keyring .loadPassphrase (KEY_ID );
81+ var result = KEYRING .loadPassphrase (KEY_ID );
8182 Assertions .assertNull (result );
8283 }
8384
You can’t perform that action at this time.
0 commit comments