Repository: stratos
Updated Branches:
  refs/heads/stratos-4.1.x bf598dd36 -> 4764bce5c


Added a test case to check IaaS providers


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4764bce5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4764bce5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4764bce5

Branch: refs/heads/stratos-4.1.x
Commit: 4764bce5c37b0bdcedb7b096e2ece8b4278111db
Parents: bf598dd
Author: Sajith <[email protected]>
Authored: Fri Nov 20 18:38:40 2015 +0530
Committer: Sajith <[email protected]>
Committed: Fri Nov 20 18:38:40 2015 +0530

----------------------------------------------------------------------
 .../tests/application/IaaSProviderTestCase.java | 55 ++++++++++++++++++++
 1 file changed, 55 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/4764bce5/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/IaaSProviderTestCase.java
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/IaaSProviderTestCase.java
 
b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/IaaSProviderTestCase.java
new file mode 100644
index 0000000..6fea349
--- /dev/null
+++ 
b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/IaaSProviderTestCase.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.integration.tests.application;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.either;
+import static org.junit.Assert.assertThat;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+import java.util.List;
+
+import org.apache.stratos.common.beans.IaasProviderInfoBean;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+/**
+ * IaaS provider related test cases
+ */
+public class IaaSProviderTestCase extends StratosIntegrationTest {
+    private static final String RESOURCES_PATH = "/api";
+    private static final String IDENTIFIER = "/iaasProviders";
+    
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = 
{"stratos.application.deployment", "failed"})
+    public void testListIaaSProviders() throws Exception {
+        assertTrue(true);  
+        
+        IaasProviderInfoBean iaasProviderInfo = (IaasProviderInfoBean) 
restClient.getEntity(RESOURCES_PATH,
+                IDENTIFIER, IaasProviderInfoBean.class, "IaaSProvider");
+        assertNotNull(iaasProviderInfo);
+        List<String> iaasList = iaasProviderInfo.getIaasProviders();
+        for (String iaas : iaasList) {
+               assertThat(iaas, 
either(containsString("kubernetes")).or(containsString("mock")) );
+               }
+    }
+
+    
+}

Reply via email to