airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata] branch group-based-auth updated: AIRAVATA-2801 Fixing USE_USER_CR_PREF column name
Date Tue, 05 Jun 2018 21:01:13 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch group-based-auth
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/group-based-auth by this push:
     new 10753c5  AIRAVATA-2801 Fixing USE_USER_CR_PREF column name
10753c5 is described below

commit 10753c592e09cea51691ef23b28ad66403910da8
Author: Marcus Christie <machristie@apache.org>
AuthorDate: Tue Jun 5 17:00:18 2018 -0400

    AIRAVATA-2801 Fixing USE_USER_CR_PREF column name
---
 .../airavata/registry/core/entities/expcatalog/ProcessEntity.java       | 2 +-
 modules/registry-refactoring/src/main/resources/expcatalog-derby.sql    | 1 +
 modules/registry-refactoring/src/main/resources/expcatalog-mysql.sql    | 1 +
 .../registry/core/repositories/expcatalog/ProcessRepositoryTest.java    | 2 ++
 4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java
b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java
index 4985102..343bc79 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java
@@ -92,7 +92,7 @@ public class ProcessEntity implements Serializable {
     @Column(name = "GROUP_RESOURCE_PROFILE_ID")
     private String groupResourceProfileId;
 
-    @Column(name = "IS_USE_USER_CR_PREF")
+    @Column(name = "USE_USER_CR_PREF")
     private boolean useUserCRPref;
 
     @OneToMany(targetEntity = ProcessStatusEntity.class, cascade = CascadeType.ALL,
diff --git a/modules/registry-refactoring/src/main/resources/expcatalog-derby.sql b/modules/registry-refactoring/src/main/resources/expcatalog-derby.sql
index d513284..06efd1a 100644
--- a/modules/registry-refactoring/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry-refactoring/src/main/resources/expcatalog-derby.sql
@@ -233,6 +233,7 @@ CREATE TABLE PROCESS (
         EXPERIMENT_DATA_DIR VARCHAR (512),
         USERNAME VARCHAR (255),
         GROUP_RESOURCE_PROFILE_ID VARCHAR (255) DEFAULT NULL,
+        USE_USER_CR_PREF BOOLEAN,
         PRIMARY KEY (PROCESS_ID),
         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );
diff --git a/modules/registry-refactoring/src/main/resources/expcatalog-mysql.sql b/modules/registry-refactoring/src/main/resources/expcatalog-mysql.sql
index c641bb6..3a316a2 100644
--- a/modules/registry-refactoring/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry-refactoring/src/main/resources/expcatalog-mysql.sql
@@ -237,6 +237,7 @@ CREATE TABLE PROCESS (
         EXPERIMENT_DATA_DIR VARCHAR (512),
         USERNAME VARCHAR (255),
         GROUP_RESOURCE_PROFILE_ID VARCHAR (255) DEFAULT NULL,
+        USE_USER_CR_PREF BIT(1),
         PRIMARY KEY (PROCESS_ID),
         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );
diff --git a/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/ProcessRepositoryTest.java
b/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/ProcessRepositoryTest.java
index fb6d7ca..1525515 100644
--- a/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/ProcessRepositoryTest.java
+++ b/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/expcatalog/ProcessRepositoryTest.java
@@ -99,11 +99,13 @@ public class ProcessRepositoryTest {
         assertTrue(experimentRepository.getExperiment(experimentId).getProcesses().size()
== 1);
 
         processModel.setProcessDetail("detail");
+        processModel.setUseUserCRPref(true);
         processRepository.updateProcess(processModel, processId);
 
         ProcessModel retrievedProcessModel = processRepository.getProcess(processId);
         assertEquals(experimentId, retrievedProcessModel.getExperimentId());
         assertEquals("detail", retrievedProcessModel.getProcessDetail());
+        assertTrue(retrievedProcessModel.isUseUserCRPref());
 
         ComputationalResourceSchedulingModel computationalResourceSchedulingModel = new ComputationalResourceSchedulingModel();
         assertEquals(processId, processRepository.addProcessResourceSchedule(computationalResourceSchedulingModel,
processId));

-- 
To stop receiving notification emails like this one, please contact
machristie@apache.org.

Mime
View raw message