mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
feat(ecr): update and validate pull-through cache rules (#4342)
This commit is contained in:
1 parent
077b65df5c
commit
b658c5f020
6 files changed
+210
-3
No files matched your search
@@ -185,6 +185,20 @@ class EcrTest {
|
||||
.extracting(PullThroughCacheRule::ecrRepositoryPrefix)
|
||||
.containsExactly(firstPrefix);
|
||||
|
||||
String credentialArn =
|
||||
"arn:aws:secretsmanager:us-east-1:000000000000:secret:ecr-pullthroughcache/sdk";
|
||||
UpdatePullThroughCacheRuleResponse updated = ecr.updatePullThroughCacheRule(builder -> builder
|
||||
.ecrRepositoryPrefix(firstPrefix)
|
||||
.credentialArn(credentialArn));
|
||||
ValidatePullThroughCacheRuleResponse validated = ecr.validatePullThroughCacheRule(
|
||||
builder -> builder.ecrRepositoryPrefix(firstPrefix));
|
||||
|
||||
assertThat(updated.credentialArn()).isEqualTo(credentialArn);
|
||||
assertThat(updated.updatedAt()).isNotNull();
|
||||
assertThat(validated.isValid()).isTrue();
|
||||
assertThat(validated.credentialArn()).isEqualTo(credentialArn);
|
||||
assertThat(validated.upstreamRegistryUrl()).isEqualTo("registry-1.docker.io");
|
||||
|
||||
DeletePullThroughCacheRuleResponse deleted = ecr.deletePullThroughCacheRule(
|
||||
builder -> builder.ecrRepositoryPrefix(firstPrefix));
|
||||
assertThat(deleted.ecrRepositoryPrefix()).isEqualTo(firstPrefix);
|
||||
|
||||
Reference in new issue
Block a user