use of com.sequenceiq.it.cloudbreak.v2.mock.StackCreationMock in project cloudbreak by hortonworks.
the class MockClusterCreationWithSaltSuccessTest method breakDown.
@AfterClass
public void breakDown() {
StackCreationMock stackCreationMock = getItContext().getContextParam(CloudbreakV2Constants.MOCK_SERVER, StackCreationMock.class);
stackCreationMock.stop();
}
use of com.sequenceiq.it.cloudbreak.v2.mock.StackCreationMock in project cloudbreak by hortonworks.
the class MockStackCreationWithSaltSuccessTest method configMockServer.
@BeforeClass
@Parameters({ "stackName", "mockPort", "sshPort" })
public void configMockServer(String stackName, @Optional("9443") int mockPort, @Optional("2020") int sshPort) {
IntegrationTestContext itContext = getItContext();
List<InstanceGroup> instanceGroups = itContext.getContextParam(CloudbreakITContextConstants.TEMPLATE_ID, List.class);
int numberOfServers = 0;
for (InstanceGroup ig : instanceGroups) {
numberOfServers += ig.getNodeCount();
}
StackCreationMock stackCreationMock = (StackCreationMock) applicationContext.getBean(StackCreationMock.NAME, mockPort, sshPort, numberOfServers);
stackCreationMock.addSPIEndpoints();
stackCreationMock.mockImageCatalogResponse(itContext);
itContext.putContextParam(CloudbreakV2Constants.MOCK_SERVER, stackCreationMock);
itContext.putContextParam(CloudbreakITContextConstants.MOCK_INSTANCE_MAP, stackCreationMock.getInstanceMap());
}
Aggregations