Search in sources :

Example 1 with GeneratedResources

use of org.sagebionetworks.stack.GeneratedResources in project Synapse-Stack-Builder by Sage-Bionetworks.

the class RdsAlarmSetupTest method before.

@Before
public void before() throws IOException {
    databaseIdentifer = "db-id-foo";
    dbInstance = new DBInstance().withDBInstanceClass(DATABASE_INSTANCE_CLASS_M1_SMALL).withDBInstanceIdentifier(databaseIdentifer);
    // Give this 10 GB
    dbInstance.setAllocatedStorage(10);
    topicArn = "arn:123:456";
    config = TestHelper.createTestConfig("dev");
    mockClient = factory.createCloudWatchClient();
    resources = new GeneratedResources();
    resources.setStackInstanceNotificationTopicArn(topicArn);
    resources.setStackInstancesDatabase(new DBInstance().withAllocatedStorage(50).withDBInstanceClass(DATABASE_INSTANCE_CLASS_M1_SMALL).withDBInstanceIdentifier(config.getStackInstanceDatabaseIdentifier()));
    resources.setIdGeneratorDatabase(new DBInstance().withAllocatedStorage(10).withDBInstanceClass(DATABASE_INSTANCE_CLASS_M1_SMALL).withDBInstanceIdentifier(config.getIdGeneratorDatabaseIdentifier()));
    List<DBInstance> stackInstanceTablesDatabases = new ArrayList<DBInstance>();
    int numTableInstances = Integer.parseInt(config.getNumberTableInstances());
    for (int i = 0; i < numTableInstances; i++) {
        DBInstance stackInstanceDatabase = new DBInstance().withAllocatedStorage(10).withDBInstanceClass(DATABASE_INSTANCE_CLASS_M1_SMALL).withDBInstanceIdentifier(config.getStackTableDBInstanceDatabaseIdentifier(i));
        stackInstanceTablesDatabases.add(stackInstanceDatabase);
    }
    resources.setStackInstanceTablesDatabases(stackInstanceTablesDatabases);
    setup = new RdsAlarmSetup(factory, config, resources);
}
Also used : DBInstance(com.amazonaws.services.rds.model.DBInstance) ArrayList(java.util.ArrayList) GeneratedResources(org.sagebionetworks.stack.GeneratedResources) Before(org.junit.Before)

Example 2 with GeneratedResources

use of org.sagebionetworks.stack.GeneratedResources in project Synapse-Stack-Builder by Sage-Bionetworks.

the class StackInstanceNotificationSetupTest method before.

@Before
public void before() throws IOException {
    config = TestHelper.createTestConfig("dev");
    mockClient = factory.createSNSClient();
    resources = new GeneratedResources();
    setup = new StackInstanceNotificationSetup(factory, config, resources);
}
Also used : GeneratedResources(org.sagebionetworks.stack.GeneratedResources) Before(org.junit.Before)

Example 3 with GeneratedResources

use of org.sagebionetworks.stack.GeneratedResources in project Synapse-Stack-Builder by Sage-Bionetworks.

the class SSLSetupTest method setUp.

@Before
public void setUp() throws IOException {
    config = TestHelper.createTestConfig("stack");
    resources = new GeneratedResources();
    mockAmznIamClient = factory.createIdentityManagementClient();
    mockAmznS3Client = factory.createS3Client();
}
Also used : GeneratedResources(org.sagebionetworks.stack.GeneratedResources) Before(org.junit.Before)

Example 4 with GeneratedResources

use of org.sagebionetworks.stack.GeneratedResources in project Synapse-Stack-Builder by Sage-Bionetworks.

the class NotificationUtilsTest method before.

@Before
public void before() throws IOException {
    config = TestHelper.createTestConfig("dev");
    mockClient = factory.createSNSClient();
    resources = new GeneratedResources();
    setup = new StackInstanceNotificationSetup(factory, config, resources);
}
Also used : GeneratedResources(org.sagebionetworks.stack.GeneratedResources) Before(org.junit.Before)

Example 5 with GeneratedResources

use of org.sagebionetworks.stack.GeneratedResources in project Synapse-Stack-Builder by Sage-Bionetworks.

the class ACMSetupTest method setUp.

@Before
public void setUp() throws IOException {
    config = TestHelper.createTestConfig("stack");
    resources = new GeneratedResources();
    mockAcmClient = factory.createCertificateManagerClient();
}
Also used : GeneratedResources(org.sagebionetworks.stack.GeneratedResources) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)8 GeneratedResources (org.sagebionetworks.stack.GeneratedResources)8 EnvironmentDescription (com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription)1 DBInstance (com.amazonaws.services.rds.model.DBInstance)1 ArrayList (java.util.ArrayList)1 DatabaseParameterGroup (org.sagebionetworks.stack.DatabaseParameterGroup)1 InputConfiguration (org.sagebionetworks.stack.config.InputConfiguration)1 Sleeper (org.sagebionetworks.stack.util.Sleeper)1