Skip to content

Commit

Permalink
Merge branch 'main' into tony/fix-collectionOfErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
josecorella authored Jan 21, 2025
2 parents 7a79db0 + c231473 commit 380665d
Show file tree
Hide file tree
Showing 9 changed files with 828 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_test_vector_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
java-version: [8, 11, 16, 17]
os: [
# Run on ubuntu image that comes pre-configured with docker
ubuntu-latest,
ubuntu-22.04,
]
runs-on: ${{ matrix.os }}
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/library_rust_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id-token: write
contents: read
env:
RUST_MIN_STACK: 104857600
RUST_MIN_STACK: 404857600
steps:
- name: Support longpaths on Git checkout
run: |
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,25 @@ jobs:
uses: ./.github/workflows/ci_examples_net.yml
with:
dafny: ${{needs.getVersion.outputs.version}}
pr-ci-all-required:
if: always()
needs:
- getVersion
- getVerifyVersion
- pr-ci-format
- pr-ci-codegen
- pr-ci-verification
- pr-ci-test-vector-verification
- pr-ci-java
- pr-ci-java-test-vectors
- pr-ci-java-examples
- pr-ci-net
- pr-ci-rust
- pr-ci-net-test-vectors
- pr-ci-net-examples
runs-on: ubuntu-22.04
steps:
- name: Verify all required jobs passed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ public class TestUtils {
public static final String TEST_LOGICAL_KEYSTORE_NAME = "KeyStoreDdbTable";
public static final String TEST_KEYSTORE_KMS_KEY_ID =
"arn:aws:kms:us-west-2:370957321024:key/9d989aa2-2f9c-438c-a745-cc57d3ad0126";
public static final String TEST_PARTITION_ID =
"91c1b6a2-6fc3-4539-ad5e-938d597ed730";

public static final String TEST_AWS_ACCOUNT_ID = "658956600833";
public static final String TEST_AWS_REGION = "us-west-2";
Expand Down
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
);
}
}
1 change: 1 addition & 0 deletions Examples/runtimes/net/src/Examples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ static async Task Main()
Thread.Sleep(5000);

await HierarchicalKeyringExample.HierarchicalKeyringGetItemPutItem(keyId, keyId2);
await SharedCacheAcrossHierarchicalKeyringsExample.SharedCacheAcrossHierarchicalKeyringsGetItemPutItem(keyId);

await BasicSearchableEncryptionExample.PutItemQueryItemWithBeacon(keyId);
await CompoundBeaconSearchableEncryptionExample.PutItemQueryItemWithCompoundBeacon(keyId);
Expand Down
2 changes: 2 additions & 0 deletions Examples/runtimes/net/src/TestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public class TestUtils
public static readonly string TEST_KEYSTORE_NAME = "KeyStoreDdbTable";
public static readonly string TEST_LOGICAL_KEYSTORE_NAME = "KeyStoreDdbTable";

public static readonly string TEST_PARTITION_ID = "91c1b6a2-6fc3-4539-ad5e-938d597ed730";

public static readonly string TEST_KEYSTORE_KMS_KEY_ID =
"arn:aws:kms:us-west-2:370957321024:key/9d989aa2-2f9c-438c-a745-cc57d3ad0126";

Expand Down

Large diffs are not rendered by default.

0 comments on commit 380665d

Please sign in to comment.