diff options
| author | doufenghu <[email protected]> | 2024-11-26 19:29:46 +0800 |
|---|---|---|
| committer | doufenghu <[email protected]> | 2024-11-26 19:29:46 +0800 |
| commit | 64a4ffb63a87c0867a58b29afc3bfc7e45910579 (patch) | |
| tree | dda7e8ec2a34f6d39df0d8986ceb2b87f8ce0186 /groot-core | |
| parent | 914af3cf28334f46fe9409acd3edf7c9bf17cd17 (diff) | |
Diffstat (limited to 'groot-core')
| -rw-r--r-- | groot-core/src/test/java/com/geedgenetworks/core/udf/test/simple/EncryptFunctionTest.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/groot-core/src/test/java/com/geedgenetworks/core/udf/test/simple/EncryptFunctionTest.java b/groot-core/src/test/java/com/geedgenetworks/core/udf/test/simple/EncryptFunctionTest.java index 4826c56..ab4ba9e 100644 --- a/groot-core/src/test/java/com/geedgenetworks/core/udf/test/simple/EncryptFunctionTest.java +++ b/groot-core/src/test/java/com/geedgenetworks/core/udf/test/simple/EncryptFunctionTest.java @@ -54,7 +54,7 @@ public class EncryptFunctionTest { } @Test - public void testEncryptByVault() throws Exception { + public void testEncryptByVault() { String secretKey = RandomUtil.randomString(32); MockedStatic<KMSUtils> kmsUtilsMockedStatic = Mockito.mockStatic(KMSUtils.class); Mockito.when(KMSUtils.getVaultKey(ArgumentMatchers.any(), ArgumentMatchers.any(), ArgumentMatchers.any())).thenReturn(new DataEncryptionKey(secretKey.getBytes(), 1)); @@ -81,7 +81,7 @@ public class EncryptFunctionTest { } @Test - public void testEncryptByLocal() throws Exception { + public void testEncryptByLocal() { RuntimeContext runtimeContext = mockLocalRuntimeContext(); Map<String, Object> map = new HashMap<>(); map.put("identifier", CryptoProvider.Algorithm.AES_256_GCM96.getIdentifier()); @@ -139,7 +139,7 @@ public class EncryptFunctionTest { } @Test - public void testEncryptNoSensitiveFields() throws Exception { + public void testEncryptNoSensitiveFields() { String secretKey = RandomUtil.randomString(32); MockedStatic<KMSUtils> kmsUtilsMockedStatic = Mockito.mockStatic(KMSUtils.class); Mockito.when(KMSUtils.getVaultKey(ArgumentMatchers.any(), ArgumentMatchers.any(), ArgumentMatchers.any())).thenReturn(new DataEncryptionKey(secretKey.getBytes(), 1)); @@ -166,7 +166,7 @@ public class EncryptFunctionTest { } @Test - public void testEncryptFirstGetKeyError() throws Exception { + public void testEncryptFirstGetKeyError() { RuntimeContext runtimeContext = mockVaultRuntimeContext(); Map<String, Object> map = new HashMap<>(); map.put("identifier", CryptoProvider.Algorithm.AES_256_GCM96.getIdentifier()); @@ -194,7 +194,7 @@ public class EncryptFunctionTest { } @Test - public void testEncryptByVaultBySSL() throws Exception { + public void testEncryptByVaultBySSL() { ClientSSLConfig sslConfig = new ClientSSLConfig(); sslConfig.setSkipVerification(true); assertDoesNotThrow(() -> KMSUtils.configureSSL(sslConfig)); @@ -238,7 +238,7 @@ public class EncryptFunctionTest { } @Test - public void testEncryptionAlgorithm() throws Exception { + public void testEncryptionAlgorithm() { Crypto crypto = CryptoProvider.createEncryptionAlgorithm(CryptoProvider.Algorithm.AES_128_GCM96.getIdentifier()); assertNotNull(crypto); crypto.setDataEncryptionKey(new DataEncryptionKey("aaaaaaaaaaaaaaaa".getBytes(), 1)); |
