airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [1/2] airavata git commit: fixing compiling errors in tests.
Date Sat, 01 Aug 2015 17:23:40 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 1ef5bc33d -> 2e815ecdc


fixing compiling errors in tests.


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/1f7b55d2
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/1f7b55d2
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/1f7b55d2

Branch: refs/heads/master
Commit: 1f7b55d2cb7b6eab569d398d519cecf0467920ef
Parents: 075e390
Author: hasinitg <hasi7786@gmail.com>
Authored: Fri Jul 24 21:11:17 2015 +0530
Committer: hasinitg <hasi7786@gmail.com>
Committed: Fri Jul 24 21:11:17 2015 +0530

----------------------------------------------------------------------
 .../handler/AiravataServerHandlerTest.java      | 49 ++++++++++----------
 1 file changed, 25 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1f7b55d2/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
index cbe694f..88db159 100644
--- a/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
+++ b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
@@ -31,6 +31,7 @@ import org.apache.airavata.model.experiment.ExperimentModel;
 import org.apache.airavata.model.experiment.ExperimentSummaryModel;
 import org.apache.airavata.model.experiment.UserConfigurationDataModel;
 import org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel;
+import org.apache.airavata.model.security.AuthzToken;
 import org.apache.airavata.model.status.ExperimentState;
 import org.apache.airavata.model.workspace.Gateway;
 import org.apache.airavata.model.workspace.Project;
@@ -62,7 +63,7 @@ public class AiravataServerHandlerTest {
 
         Gateway gateway = new Gateway();
         gateway.setGatewayId(gatewayId);
-        airavataServerHandler.addGateway(gateway);
+        airavataServerHandler.addGateway(new AuthzToken(""), gateway);
     }
 
     @AfterClass
@@ -83,7 +84,7 @@ public class AiravataServerHandlerTest {
             project.setOwner("TestUser"+TAG);
             project.setName("TestProject"+TAG);
             project.setDescription("This is a test project"+TAG);
-            String projectId1 = airavataServerHandler.createProject(gatewayId, project);
+            String projectId1 = airavataServerHandler.createProject(new AuthzToken(""), gatewayId,
project);
             Assert.assertNotNull(projectId1);
 
             //testing the update of a project
@@ -92,10 +93,10 @@ public class AiravataServerHandlerTest {
             updatedProject.setOwner("TestUser"+TAG);
             updatedProject.setName("UpdatedTestProject"+TAG);
             updatedProject.setDescription("This is an updated test project"+TAG);
-            airavataServerHandler.updateProject(projectId1, updatedProject);
+            airavataServerHandler.updateProject(new AuthzToken(""), projectId1, updatedProject);
 
             //testing project retrieval
-            Project retrievedProject = airavataServerHandler.getProject(projectId1);
+            Project retrievedProject = airavataServerHandler.getProject(new AuthzToken(""),
projectId1);
             Assert.assertEquals(updatedProject.getProjectID(), retrievedProject.getProjectID());
             Assert.assertEquals(updatedProject.getOwner(), retrievedProject.getOwner());
             Assert.assertEquals(updatedProject.getName(), retrievedProject.getName());
@@ -109,28 +110,28 @@ public class AiravataServerHandlerTest {
             project.setOwner("TestUser"+TAG);
             project.setName("Project Terrible"+TAG);
             project.setDescription("This is a test project_2"+TAG);
-            String projectId2 = airavataServerHandler.createProject(gatewayId, project);
+            String projectId2 = airavataServerHandler.createProject(new AuthzToken(""), gatewayId,
project);
             Assert.assertNotNull(projectId2);
 
             project = new Project();
             project.setOwner("TestUser"+TAG);
             project.setName("Project Funny"+TAG);
             project.setDescription("This is a test project_3"+TAG);
-            String projectId3 = airavataServerHandler.createProject(gatewayId, project);
+            String projectId3 = airavataServerHandler.createProject(new AuthzToken(""), gatewayId,
project);
             Assert.assertNotNull(projectId3);
 
             project = new Project();
             project.setOwner("TestUser"+TAG);
             project.setName("Project Stupid"+TAG);
             project.setDescription("This is a test project_4"+TAG);
-            String projectId4 = airavataServerHandler.createProject(gatewayId, project);
+            String projectId4 = airavataServerHandler.createProject(new AuthzToken(""), gatewayId,
project);
             Assert.assertNotNull(projectId4);
 
             project = new Project();
             project.setOwner("TestUser"+TAG);
             project.setName("Project Boring"+TAG);
             project.setDescription("This is a test project_5"+TAG);
-            String projectId5 = airavataServerHandler.createProject(gatewayId, project);
+            String projectId5 = airavataServerHandler.createProject(new AuthzToken(""), gatewayId,
project);
             Assert.assertNotNull(projectId5);
 
             //search project by project name
@@ -138,7 +139,7 @@ public class AiravataServerHandlerTest {
                     "TestUser"+TAG, "Terrible"+TAG);
             Assert.assertTrue(list.size()==1);
             //with pagination
-            list = airavataServerHandler.searchProjectsByProjectNameWithPagination(gatewayId,
+            list = airavataServerHandler.searchProjectsByProjectNameWithPagination(new AuthzToken(""),
gatewayId,
                     "TestUser" + TAG, "Project", 2, 1);
             Assert.assertTrue(list.size()==2);
 
@@ -147,7 +148,7 @@ public class AiravataServerHandlerTest {
                     "test project_2"+TAG);
             Assert.assertTrue(list.size()==1);
             //with pagination
-            list = airavataServerHandler.searchProjectsByProjectDescWithPagination(gatewayId,
+            list = airavataServerHandler.searchProjectsByProjectDescWithPagination(new AuthzToken(""),
gatewayId,
                     "TestUser" + TAG, "test", 2, 1);
             Assert.assertTrue(list.size()==2);
 
@@ -155,7 +156,7 @@ public class AiravataServerHandlerTest {
             list = airavataServerHandler.getAllUserProjects(gatewayId, "TestUser"+TAG);
             Assert.assertTrue(list.size()==5);
             //with pagination
-            list = airavataServerHandler.getAllUserProjectsWithPagination(gatewayId, "TestUser"
+ TAG, 2, 2);
+            list = airavataServerHandler.getAllUserProjectsWithPagination(new AuthzToken(""),
gatewayId, "TestUser" + TAG, 2, 2);
             Assert.assertTrue(list.size()==2);
             Project project1 = list.get(0);
             Project project2 = list.get(1);
@@ -181,7 +182,7 @@ public class AiravataServerHandlerTest {
             project.setOwner("TestUser"+TAG);
             project.setName("TestProject"+TAG);
             project.setDescription("This is a test project"+TAG);
-            String projectId1 = airavataServerHandler.createProject(gatewayId,project);
+            String projectId1 = airavataServerHandler.createProject(new AuthzToken(""), gatewayId,project);
             Assert.assertNotNull(projectId1);
 
             //creating sample echo experiment. assumes echo application is already defined
@@ -210,11 +211,11 @@ public class AiravataServerHandlerTest {
             experiment.setUserConfigurationData(userConfigurationData);
             experiment.addToExperimentInputs(inputDataObjectType);
 
-            String experimentId1 = airavataServerHandler.createExperiment(gatewayId, experiment);
+            String experimentId1 = airavataServerHandler.createExperiment(new AuthzToken(""),
gatewayId, experiment);
             Assert.assertNotNull(experimentId1);
 
             //retrieving the stored experiment
-            ExperimentModel retrievedExperiment = airavataServerHandler.getExperiment(experimentId1);
+            ExperimentModel retrievedExperiment = airavataServerHandler.getExperiment(new
AuthzToken(""), experimentId1);
             Assert.assertNotNull(retrievedExperiment);
             Assert.assertEquals(retrievedExperiment.getProjectId(), experiment.getProjectId());
             Assert.assertEquals(retrievedExperiment.getDescription(), experiment.getDescription());
@@ -229,7 +230,7 @@ public class AiravataServerHandlerTest {
             outputDataObjectType.setName("Output_to_Echo");
             outputDataObjectType.setValue("Hello World");
             experiment.addToExperimentOutputs(outputDataObjectType);
-            airavataServerHandler.updateExperiment(experimentId1, experiment);
+            airavataServerHandler.updateExperiment(new AuthzToken(""), experimentId1, experiment);
 
             //creating more experiments
             experiment = new ExperimentModel();
@@ -241,7 +242,7 @@ public class AiravataServerHandlerTest {
             experiment.setUserConfigurationData(userConfigurationData);
             experiment.addToExperimentInputs(inputDataObjectType);
 
-            String experimentId2 = airavataServerHandler.createExperiment(gatewayId, experiment);
+            String experimentId2 = airavataServerHandler.createExperiment(new AuthzToken(""),
gatewayId, experiment);
             Assert.assertNotNull(experimentId2);
 
             experiment = new ExperimentModel();
@@ -253,7 +254,7 @@ public class AiravataServerHandlerTest {
             experiment.setUserConfigurationData(userConfigurationData);
             experiment.addToExperimentInputs(inputDataObjectType);
 
-            String experimentId3 = airavataServerHandler.createExperiment(gatewayId, experiment);
+            String experimentId3 = airavataServerHandler.createExperiment(new AuthzToken(""),
gatewayId, experiment);
             Assert.assertNotNull(experimentId3);
 
             //searching experiments by name
@@ -261,7 +262,7 @@ public class AiravataServerHandlerTest {
                     "TestUser" + TAG, "Experiment2");
             Assert.assertTrue(results.size()==1);
             //with pagination
-            results = airavataServerHandler.searchExperimentsByNameWithPagination(gatewayId,
+            results = airavataServerHandler.searchExperimentsByNameWithPagination(new AuthzToken(""),
gatewayId,
                     "TestUser" + TAG, "Experi", 2, 0);
             Assert.assertTrue(results.size()==2);
 
@@ -271,7 +272,7 @@ public class AiravataServerHandlerTest {
                     gatewayId, "TestUser" + TAG, time-10000, time+1000);
             Assert.assertTrue(results.size()==3);
             //with pagination
-            results = airavataServerHandler.searchExperimentsByCreationTimeWithPagination(
+            results = airavataServerHandler.searchExperimentsByCreationTimeWithPagination(new
AuthzToken(""),
                     gatewayId, "TestUser" + TAG, time-10000, time+1000, 2, 1);
             Assert.assertTrue(results.size()==2);
 
@@ -281,7 +282,7 @@ public class AiravataServerHandlerTest {
                     gatewayId, "TestUser" + TAG, experimentState);
             Assert.assertTrue(results.size() == 3);
             //with pagination
-            results = airavataServerHandler.searchExperimentsByStatusWithPagination(
+            results = airavataServerHandler.searchExperimentsByStatusWithPagination(new AuthzToken(""),
                     gatewayId, "TestUser" + TAG, experimentState, 2, 0);
             Assert.assertTrue(results.size()==2);
 
@@ -290,7 +291,7 @@ public class AiravataServerHandlerTest {
                     gatewayId, "TestUser" + TAG, "Ech");
             Assert.assertTrue(results.size() == 3);
             //with pagination
-            results = airavataServerHandler.searchExperimentsByApplicationWithPagination(
+            results = airavataServerHandler.searchExperimentsByApplicationWithPagination(new
AuthzToken(""),
                     gatewayId, "TestUser" + TAG, "Ech", 2, 0);
             Assert.assertTrue(results.size()==2);
 
@@ -299,7 +300,7 @@ public class AiravataServerHandlerTest {
                     gatewayId, "TestUser" + TAG, "exp");
             Assert.assertTrue(results.size() == 3);
             //with pagination
-            results = airavataServerHandler.searchExperimentsByDescWithPagination(
+            results = airavataServerHandler.searchExperimentsByDescWithPagination(new AuthzToken(""),
                     gatewayId, "TestUser" + TAG, "exp", 2, 0);
             Assert.assertTrue(results.size()==2);
 
@@ -308,14 +309,14 @@ public class AiravataServerHandlerTest {
             List<ExperimentModel> list = airavataServerHandler.getAllExperimentsInProject(projectId1);
             Assert.assertTrue(list.size()==3);
             //with pagination
-            list = airavataServerHandler.getAllExperimentsInProjectWithPagination(projectId1,
2, 1);
+            list = airavataServerHandler.getAllExperimentsInProjectWithPagination(new AuthzToken(""),
projectId1, 2, 1);
             Assert.assertTrue(list.size()==2);
 
             //getting all user experiments
             list = airavataServerHandler.getAllUserExperiments(gatewayId, "TestUser" + TAG);
             Assert.assertTrue(list.size() == 3);
             //with pagination
-            list = airavataServerHandler.getAllUserExperimentsWithPagination(
+            list = airavataServerHandler.getAllUserExperimentsWithPagination(new AuthzToken(""),
                     gatewayId, "TestUser" + TAG, 2, 0);
             //testing time ordering
             Assert.assertTrue(list.size()==2);


Mime
View raw message