Commit dff944f8 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added isServiceUp

parent b5b5f7bb
......@@ -150,10 +150,13 @@ public class CloudStormServiceTest {
*/
@Test
public void testWriteCloudStormTopologyFiles() throws Exception {
System.out.println("writeCloudStormTopologyFiles");
CloudStormService instance = getService(messageExampleProvisioneRequestFilePath);
Map<String, Object> result = instance.writeCloudStormTopologyFiles(tempInputDirPath);
assertNotNull(result);
if (ToscaHelper.isServiceUp(sureToscaBasePath)) {
System.out.println("writeCloudStormTopologyFiles");
CloudStormService instance = getService(messageExampleProvisioneRequestFilePath);
Map<String, Object> result = instance.writeCloudStormTopologyFiles(tempInputDirPath);
assertNotNull(result);
}
}
/**
......@@ -163,25 +166,26 @@ public class CloudStormServiceTest {
*/
@Test
public void testBuildSSHKeyPair() throws Exception {
System.out.println("buildSSHKeyPair");
CloudStormService instance = getService(messageExampleProvisioneRequestFilePath);
initPaths();
String result = instance.buildSSHKeyPair(tempInputDirPath, null);
assertNotNull(result);
String userPublicKeyName = "id_rsa.pub";
String userPrivateName = FilenameUtils.removeExtension(userPublicKeyName);
assertTrue(new File(tempInputDirPath + File.separator + userPrivateName).exists());
assertTrue(new File(tempInputDirPath + File.separator + userPublicKeyName).exists());
instance = getService(messageExampleDeleteRequestFilePath);
initPaths();
result = instance.buildSSHKeyPair(tempInputDirPath, null);
assertNotNull(result);
userPublicKeyName = "id_rsa.pub";
userPrivateName = FilenameUtils.removeExtension(userPublicKeyName);
assertTrue(new File(tempInputDirPath + File.separator + userPrivateName).exists());
assertTrue(new File(tempInputDirPath + File.separator + userPublicKeyName).exists());
if (ToscaHelper.isServiceUp(sureToscaBasePath)) {
System.out.println("buildSSHKeyPair");
CloudStormService instance = getService(messageExampleProvisioneRequestFilePath);
initPaths();
String result = instance.buildSSHKeyPair(tempInputDirPath, null);
assertNotNull(result);
String userPublicKeyName = "id_rsa.pub";
String userPrivateName = FilenameUtils.removeExtension(userPublicKeyName);
assertTrue(new File(tempInputDirPath + File.separator + userPrivateName).exists());
assertTrue(new File(tempInputDirPath + File.separator + userPublicKeyName).exists());
instance = getService(messageExampleDeleteRequestFilePath);
initPaths();
result = instance.buildSSHKeyPair(tempInputDirPath, null);
assertNotNull(result);
userPublicKeyName = "id_rsa.pub";
userPrivateName = FilenameUtils.removeExtension(userPublicKeyName);
assertTrue(new File(tempInputDirPath + File.separator + userPrivateName).exists());
assertTrue(new File(tempInputDirPath + File.separator + userPublicKeyName).exists());
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment