Skip to content

Commit

Permalink
Fix Integration Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
loachri committed Aug 2, 2024
1 parent 523fe45 commit 39e1680
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class ServiceTier extends cdk.Stack {
version: this.version,
database: props.database,
fileSystem: props.mountableFileSystem,
repositoryInstallationTimeout: cdk.Duration.minutes(20),
repositoryInstallationTimeout: cdk.Duration.minutes(30),
repositoryInstallationPrefix: "/",
secretsManagementSettings: {
enabled: props.enableSecretsManagement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class SEPStack extends Stack {
const repository = new Repository(this, 'Repository', {
vpc,
version: recipes.version,
repositoryInstallationTimeout: Duration.minutes(20),
repositoryInstallationTimeout: Duration.minutes(30),
// TODO - Evaluate deletion protection for your own needs. These properties are set to RemovalPolicy.DESTROY
// to cleanly remove everything when this stack is destroyed. If you would like to ensure
// that these resources are not accidentally deleted, you should set these properties to RemovalPolicy.RETAIN
Expand Down
2 changes: 1 addition & 1 deletion examples/deadline/Local-Zone/ts/lib/service-tier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class ServiceTier extends Stack {
database: RemovalPolicy.DESTROY,
filesystem: RemovalPolicy.DESTROY,
},
repositoryInstallationTimeout: Duration.minutes(20),
repositoryInstallationTimeout: Duration.minutes(30),
vpcSubnets: repositorySubnets,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class RepositoryTestingTier extends TestingTier {
'cd ~ec2-user',
'mkdir -p testScripts',
'cd testScripts',
'wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem',
'wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem',
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ -d "$CERT" ]; then
# The domain zone for the mongo instance used is hard-coded during setup
DB_ADDRESS="mongo.renderfarm.local:27017"
else
CERT_CA="./testScripts/rds-combined-ca-bundle.pem"
CERT_CA="./testScripts/global-bundle.pem"

# DocDB contains the endpoint address to use in its secret
ENDPOINT=$(jq -r '.host' <<< "$DB_SECRET_STRING")
Expand All @@ -39,6 +39,5 @@ else
fi

# Mongo command to query for "deadline10db" database
mongo --quiet --ssl --host="$DB_ADDRESS" --sslCAFile="$CERT_CA" --username="$DB_USERNAME" --password="$DB_PASS" --eval='printjson( db.adminCommand( { listDatabases: 1, nameOnly: true, filter: { "name": "deadline10db" } } ) )'

mongo --quiet --ssl --host="$DB_ADDRESS" --sslCAFile="$CERT_CA" --username="$DB_USERNAME" --password="$DB_PASS" --eval='(function(){var output=db.adminCommand({ listDatabases: 1, nameOnly: true, filter: { "name": "deadline10db" } } );delete output.onTime;delete output.operationTime;printjson(output)})()'
exit 0
2 changes: 1 addition & 1 deletion integ/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
transform: {
'^.+\\.tsx?$': 'ts-jest'
},
testTimeout: 60000,
testTimeout: 300000,
setupFilesAfterEnv: [
"<rootDir>/components/deadline/common/jest-matchers.js"
]
Expand Down
2 changes: 1 addition & 1 deletion integ/lib/storage-struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class StorageStruct extends Construct {
database: databaseConnection,
fileSystem: deadlineMountableEfs,
version: props.version,
repositoryInstallationTimeout: Duration.minutes(20),
repositoryInstallationTimeout: Duration.minutes(30),
logGroupProps: {
logGroupPrefix: `/${Stack.of(this).stackName}-${id}/`,
retention: RetentionDays.TWO_MONTHS,
Expand Down
9 changes: 5 additions & 4 deletions packages/aws-rfdk/lib/deadline/lib/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export interface RepositoryProps {
*
* The maximum value is 43200 (12 hours).
*
* @default Duration.minutes(15)
* @default Duration.minutes(30)
*/
readonly repositoryInstallationTimeout?: Duration;

Expand Down Expand Up @@ -620,6 +620,7 @@ export class Repository extends Construct implements IRepository {
}) : undefined),
};


this.fileSystem = props.fileSystem ?? (() => {
const fs = new EfsFileSystem(this, 'FileSystem', {
vpc: props.vpc,
Expand Down Expand Up @@ -677,7 +678,7 @@ export class Repository extends Construct implements IRepository {
*/
const parameterGroup = databaseAuditLogging ? new ClusterParameterGroup(this, 'ParameterGroup', {
description: 'DocDB cluster parameter group with enabled audit logs',
family: 'docdb3.6',
family: 'docdb5.0',
parameters: {
audit_logs: 'enabled',
},
Expand All @@ -686,7 +687,7 @@ export class Repository extends Construct implements IRepository {
const instances = props.documentDbInstanceCount ?? Repository.DEFAULT_NUM_DOCDB_INSTANCES;
const dbCluster = new DatabaseCluster(this, 'DocumentDatabase', {
masterUser: {username: 'DocDBUser'},
engineVersion: '3.6.0',
engineVersion: '5.0.0',
instanceType: InstanceType.of(InstanceClass.R5, InstanceSize.LARGE),
vpc: props.vpc,
vpcSubnets: props.vpcSubnets ?? { subnetType: SubnetType.PRIVATE_WITH_EGRESS, onePerAz: true },
Expand Down Expand Up @@ -741,7 +742,7 @@ export class Repository extends Construct implements IRepository {
maxCapacity: 1,
updatePolicy: UpdatePolicy.replacingUpdate(),
signals: Signals.waitForAll({
timeout: (props.repositoryInstallationTimeout || Duration.minutes(15)),
timeout: (props.repositoryInstallationTimeout || Duration.minutes(30)),
}),
securityGroup: props.securityGroupsOptions?.installer,
});
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-rfdk/lib/deadline/test/repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ beforeEach(() => {
s3Bucket: new Bucket(stack, 'LinuxClientInstallerBucket'),
},
};
version = create_version([10,1,19,4]);
version = create_version([10,3,2,1]);
});

test('can create two repositories', () => {
Expand Down Expand Up @@ -165,7 +165,7 @@ test('repository installer instance is created correctly', () => {
CreationPolicy: {
ResourceSignal: {
Count: 1,
Timeout: 'PT15M',
Timeout: 'PT30M',
},
},
UpdatePolicy: {
Expand Down

0 comments on commit 39e1680

Please sign in to comment.