-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add blocking executor to async caches (#759)
Signed-off-by: Paolo Di Tommaso <[email protected]>
- Loading branch information
1 parent
a2db2b0
commit 86f7d3e
Showing
13 changed files
with
119 additions
and
42 deletions.
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,24 +18,27 @@ | |
|
||
package io.seqera.wave.service.aws | ||
|
||
|
||
import spock.lang.Requires | ||
import spock.lang.Specification | ||
|
||
|
||
import io.micronaut.test.extensions.spock.annotation.MicronautTest | ||
import jakarta.inject.Inject | ||
/** | ||
* | ||
* @author Paolo Di Tommaso <[email protected]> | ||
*/ | ||
@MicronautTest | ||
class AwsEcrServiceTest extends Specification { | ||
|
||
@Inject | ||
AwsEcrService provider | ||
|
||
@Requires({System.getenv('AWS_ACCESS_KEY_ID') && System.getenv('AWS_SECRET_ACCESS_KEY')}) | ||
def 'should get registry token' () { | ||
given: | ||
def accessKey = System.getenv('AWS_ACCESS_KEY_ID') | ||
def secretKey = System.getenv('AWS_SECRET_ACCESS_KEY') | ||
def REGION = 'eu-west-1' | ||
def provider = new AwsEcrService() | ||
|
||
when: | ||
def creds = provider.getLoginToken(accessKey, secretKey, REGION, false).tokenize(":") | ||
|
@@ -49,17 +52,15 @@ class AwsEcrServiceTest extends Specification { | |
thrown(Exception) | ||
} | ||
|
||
@Requires({System.getenv('AWS_ACCESS_KEY_ID') && System.getenv('AWS_SECRET_ACCESS_KEY')}) | ||
def 'should check registry info' () { | ||
given: | ||
def provider = new AwsEcrService() | ||
expect: | ||
provider.getEcrHostInfo(null) == null | ||
provider.getEcrHostInfo('foo') == null | ||
provider.getEcrHostInfo('195996028523.dkr.ecr.eu-west-1.amazonaws.com') == new AwsEcrService.AwsEcrHostInfo('195996028523', 'eu-west-1') | ||
provider.getEcrHostInfo('195996028523.dkr.ecr.eu-west-1.amazonaws.com/foo') == new AwsEcrService.AwsEcrHostInfo('195996028523', 'eu-west-1') | ||
and: | ||
provider.getEcrHostInfo('public.ecr.aws') == new AwsEcrService.AwsEcrHostInfo(null, 'us-east-1') | ||
|
||
} | ||
|
||
def 'should check ecr registry' () { | ||
|
Oops, something went wrong.