-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into singleton-keyvectors
- Loading branch information
Showing
7 changed files
with
805 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
429 changes: 429 additions & 0 deletions
429
...re/amazon/cryptography/examples/keyring/SharedCacheAcrossHierarchicalKeyringsExample.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...mazon/cryptography/examples/keyring/TestSharedCacheAcrossHierarchicalKeyringsExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package software.amazon.cryptography.examples.keyring; | ||
|
||
import org.testng.annotations.Test; | ||
import software.amazon.cryptography.examples.CreateKeyStoreKeyExample; | ||
import software.amazon.cryptography.examples.TestUtils; | ||
|
||
public class TestSharedCacheAcrossHierarchicalKeyringsExample { | ||
|
||
@Test | ||
public void TestSharedCacheAcrossHierarchicalKeyringsExample() | ||
throws InterruptedException { | ||
// Create new branch key for test | ||
String keyId = CreateKeyStoreKeyExample.KeyStoreCreateKey( | ||
TestUtils.TEST_KEYSTORE_NAME, | ||
TestUtils.TEST_LOGICAL_KEYSTORE_NAME, | ||
TestUtils.TEST_KEYSTORE_KMS_KEY_ID | ||
); | ||
|
||
// Key creation is eventually consistent, so wait 5 seconds to decrease the likelihood | ||
// our test fails due to eventual consistency issues. | ||
Thread.sleep(5000); | ||
|
||
SharedCacheAcrossHierarchicalKeyringsExample.SharedCacheAcrossHierarchicalKeyringsGetItemPutItem( | ||
TestUtils.TEST_DDB_TABLE_NAME, | ||
keyId, | ||
TestUtils.TEST_KEYSTORE_NAME, | ||
TestUtils.TEST_LOGICAL_KEYSTORE_NAME, | ||
TestUtils.TEST_PARTITION_ID, | ||
TestUtils.TEST_KEYSTORE_KMS_KEY_ID | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
338 changes: 338 additions & 0 deletions
338
Examples/runtimes/net/src/keyring/SharedCacheAcrossHierarchicalKeyringsExample.cs
Large diffs are not rendered by default.
Oops, something went wrong.