Skip to content

Commit

Permalink
Merge pull request Netflix#265 from claymccoy/sdbPrBuildFAilures
Browse files Browse the repository at this point in the history
Trying to fix errors in Pull Request build
  • Loading branch information
claymccoy committed Mar 6, 2013
2 parents 30d658f + 12f815c commit 88e9d9d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ApplicationService implements CacheInitializer, InitializingBean {
domainName = configService.applicationsDomain

// Applications are stored only in the default region, so no multi region support needed here.
simpleDbClient = awsClientService.create(AmazonSimpleDB)
simpleDbClient = simpleDbClient ?: awsClientService.create(AmazonSimpleDB)
}

void initializeCaches() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ class AwsClientService implements InitializingBean {

public <T> T create(Class<T> interfaceType) {
Class implementationType = interfaceSimpleNamesToAwsClientClasses[interfaceType.simpleName]
createImpl(implementationType)
}

public <T> T createImpl(Class<T> implementationType) {
implementationType.newInstance(secretService.awsCredentials, clientConfiguration) as T
}

Expand Down
1 change: 1 addition & 0 deletions src/groovy/com/netflix/asgard/mock/Mocks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ class Mocks {
applicationService.grailsApplication = grailsApplication()
applicationService.configService = configService()
applicationService.awsClientService = awsClientService()
applicationService.simpleDbClient = applicationService.awsClientService.createImpl(MockAmazonSimpleDBClient)

List<String> names =
['abcache', 'api', 'aws_stats', 'cryptex', 'helloworld', 'ntsuiboot', 'videometadata'].asImmutable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class SecurityCreateCommandTests {
void setUp() {
TestUtils.setUpMockRequest()
MockUtils.prepareForConstraintsTests(SecurityCreateCommand)
Mocks.createDynamicMethods()
appService = Mocks.applicationService()
}

Expand Down

0 comments on commit 88e9d9d

Please sign in to comment.