Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/catgenome/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ dependencies {
compile group: "com.mangofactory", name: "swagger-springmvc", version: "1.0.2"
// H2 Database Engine & Connection pool
compile group: "com.mchange", name: "c3p0", version: "0.9.5.1"
compile group: "com.h2database", name: "h2", version: "1.3.176"
compile group: "com.h2database", name: "h2", version: "1.4.200"
compile group: "org.aspectj", name: "aspectjweaver", version: "1.8.8"
compile group: 'org.postgresql', name: 'postgresql', version: "9.4-1206-jdbc4"
// Flyway database migration to update embedded database when application starts
Expand Down
2 changes: 1 addition & 1 deletion server/catgenome/profiles/h2/test-catgenome-acl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ database.username=catgenome
database.password=
database.initial.pool.size=5
database.driver.class=org.h2.Driver
database.jdbc.url=jdbc:h2:mem:test_catgenome;DB_CLOSE_ON_EXIT=FALSE'
database.jdbc.url=jdbc:h2:mem:test_catgenome'

s3.access.test.key=
s3.secret.test.key=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ database.username=catgenome
database.password=
database.initial.pool.size=5
database.driver.class=org.h2.Driver
database.jdbc.url=jdbc:h2:mem:test_catgenome;DB_CLOSE_ON_EXIT=FALSE'
database.jdbc.url=jdbc:h2:mem:test_catgenome'

s3.access.test.key=
s3.secret.test.key=
Expand Down
2 changes: 1 addition & 1 deletion server/catgenome/profiles/h2/test-catgenome.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ database.username=catgenome
database.password=
database.initial.pool.size=5
database.driver.class=org.h2.Driver
database.jdbc.url=jdbc:h2:mem:test_catgenome;DB_CLOSE_ON_EXIT=FALSE'
database.jdbc.url=jdbc:h2:mem:test_catgenome'

s3.access.test.key=
s3.secret.test.key=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ CREATE TABLE IF NOT EXISTS CATGENOME.VCF_SAMPLE (
SAMPLE_NAME VARCHAR(250) NOT NULL,
ORDER_INDEX INTEGER,
CONSTRAINT vcf_sample_id_pkey PRIMARY KEY (VCF_SAMPLE_ID),
CONSTRAINT vcf_sample_vcf_id_fkey FOREIGN KEY (VCF_ID) REFERENCES CATGENOME.VCF (VCF_ID),
CONSTRAINT vcf_sample_vcf_id_fkey FOREIGN KEY (VCF_ID) REFERENCES CATGENOME.VCF (VCF_ID)
);

CREATE TABLE IF NOT EXISTS CATGENOME.BAM (
Expand Down Expand Up @@ -225,7 +225,7 @@ CREATE TABLE IF NOT EXISTS CATGENOME.MAF
CREATE TABLE IF NOT EXISTS CATGENOME.PERSON_ROLE (
ROLE_ID BIGINT NOT NULL,
CODE VARCHAR(100) NOT NULL,
CONSTRAINT role_id_pkey PRIMARY KEY (ROLE_ID),
CONSTRAINT role_id_pkey PRIMARY KEY (ROLE_ID)
);

CREATE TABLE IF NOT EXISTS CATGENOME.PERSON (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE TABLE IF NOT EXISTS CATGENOME.SHORT_URLS (
ID VARCHAR(250) NOT NULL,
CREATED_DATE TIMESTAMP,
URL TEXT NOT NULL,
URL TEXT NOT NULL
);
CREATE INDEX CATGENOME.SHORT_URLS_IDX ON CATGENOME.SHORT_URLS(CREATED_DATE);
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
public class ProjectManagerTest extends AbstractManagerTest {
public static final String TEST_PARENT = "testParent";
public static final String TEST_CHILD = "testChild1";
public static final String TEST_CHILD_2_NAME = "testChild2";
public static final String TEMPLATES_GENES_SORTED_GTF_PATH = "classpath:templates/genes_sorted.gtf";
public static final String REQUEST_NAME = "genes";
@Autowired
private ProjectManager projectManager;

Expand Down Expand Up @@ -261,7 +264,7 @@ public void testDeleteProjectWithNested() throws IOException {
child1 = projectManager.create(child1, parent.getId());

Project child2 = new Project();
child2.setName("testChild2");
child2.setName(TEST_CHILD_2_NAME);
child2.setItems(Collections.singletonList(
new ProjectItem(new BiologicalDataItem(testReference.getBioDataItemId()))));
child2 = projectManager.create(child2, parent.getId());
Expand Down Expand Up @@ -361,7 +364,7 @@ public void testMoveProjectToParent()
Assert.assertEquals(child1.getId(), parent.getNestedProjects().get(0).getId());

Project child2 = new Project();
child2.setName("testChild2");
child2.setName(TEST_CHILD_2_NAME);
child2.setItems(Collections.singletonList(
new ProjectItem(new BiologicalDataItem(testReference.getBioDataItemId()))));
child2 = projectManager.create(child2);
Expand Down Expand Up @@ -389,11 +392,11 @@ public void testMoveProjectToParent()

addVcfFileToProject(parent.getId(), "testVcf", TEST_VCF_FILE_PATH);

Resource resource = context.getResource("classpath:templates/genes_sorted.gtf");
Resource resource = context.getResource(TEMPLATES_GENES_SORTED_GTF_PATH);

FeatureIndexedFileRegistrationRequest request = new FeatureIndexedFileRegistrationRequest();
request.setReferenceId(referenceId);
request.setName("genes");
request.setName(REQUEST_NAME);
request.setPath(resource.getFile().getAbsolutePath());

GeneFile geneFile = gffManager.registerGeneFile(request);
Expand Down Expand Up @@ -433,16 +436,16 @@ public void testLoadTopLevelProjects() throws IOException {
project2 = projectManager.create(project2);
Long project2Id = project2.getId();
addVcfFileToProject(project2Id, "testVcf", TEST_VCF_FILE_PATH);
Resource resource = context.getResource("classpath:templates/genes_sorted.gtf");
Resource resource = context.getResource(TEMPLATES_GENES_SORTED_GTF_PATH);
FeatureIndexedFileRegistrationRequest request = new FeatureIndexedFileRegistrationRequest();
request.setReferenceId(referenceId);
request.setName("genes");
request.setName(REQUEST_NAME);
request.setPath(resource.getFile().getAbsolutePath());
GeneFile geneFile = gffManager.registerGeneFile(request);
projectManager.addProjectItem(project2Id, geneFile.getBioDataItemId());

Project project3 = new Project();
project3.setName("testChild2");
project3.setName(TEST_CHILD_2_NAME);
project3.setItems(Collections.singletonList(
new ProjectItem(new BiologicalDataItem(testReference.getBioDataItemId()))));
project3 = projectManager.create(project3);
Expand Down Expand Up @@ -495,7 +498,7 @@ public void testLoadTreeWithParent() {
child1 = projectManager.create(child1, parent.getId());

Project child2 = new Project();
child2.setName("testChild2");
child2.setName(TEST_CHILD_2_NAME);
child2.setItems(Collections.singletonList(
new ProjectItem(new BiologicalDataItem(testReference.getBioDataItemId()))));
child2 = projectManager.create(child2, parent.getId());
Expand Down Expand Up @@ -533,11 +536,11 @@ public void testAllFileTypesLoading()
addVcfFileToProject(project.getId(), TEST_VCF_FILE_NAME1, TEST_VCF_FILE_PATH);

// Add genes
Resource resource = context.getResource("classpath:templates/genes_sorted.gtf");
Resource resource = context.getResource(TEMPLATES_GENES_SORTED_GTF_PATH);

FeatureIndexedFileRegistrationRequest geneRequest = new FeatureIndexedFileRegistrationRequest();
geneRequest.setReferenceId(referenceId);
geneRequest.setName("genes");
geneRequest.setName(REQUEST_NAME);
geneRequest.setPath(resource.getFile().getAbsolutePath());

GeneFile geneFile = gffManager.registerGeneFile(geneRequest);
Expand Down Expand Up @@ -633,11 +636,11 @@ public void testAllFileTypesLoading()
@Test
@Transactional(propagation = Propagation.REQUIRED)
public void testLoadReferenceGenes() throws IOException {
Resource resource = context.getResource("classpath:templates/genes_sorted.gtf");
Resource resource = context.getResource(TEMPLATES_GENES_SORTED_GTF_PATH);

FeatureIndexedFileRegistrationRequest geneRequest = new FeatureIndexedFileRegistrationRequest();
geneRequest.setReferenceId(referenceId);
geneRequest.setName("genes");
geneRequest.setName(REQUEST_NAME);
geneRequest.setPath(resource.getFile().getAbsolutePath());

GeneFile geneFile = gffManager.registerGeneFile(geneRequest);
Expand Down