Skip to content

Commit

Permalink
Merge pull request #32 from charvolant/master
Browse files Browse the repository at this point in the history
Release 1.4.6
  • Loading branch information
charvolant authored Feb 8, 2021
2 parents 8b55d2c + caebd2a commit fd37804
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ branches:
- master
before_install:
- mkdir -p ~/.m2; wget -q -O ~/.m2/settings.xml https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/travis_maven_settings.xml
- sudo mkdir -p /data/lucene; sudo wget -O /data/lucene/namematching-20190213.tgz https://biocache.ala.org.au/archives/nameindexes/20190213/namematching-20190213.tgz
- sudo mkdir -p /data/lucene; sudo wget -O /data/lucene/namematching-20200214.tgz https://biocache.ala.org.au/archives/nameindexes/20200214/namematching-20200214.tgz
- cd /data/lucene
- sudo tar zxvf namematching-20190213.tgz
- sudo ln -s namematching-20190213 namematching
- sudo tar zxvf namematching-20200214.tgz
- sudo ln -s namematching-20200214 namematching
- ls -laF
- cd $TRAVIS_BUILD_DIR

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sds [![Build Status](https://travis-ci.org/AtlasOfLivingAustralia/sds.svg?branch#master)](https://travis-ci.org/AtlasOfLivingAustralia/sds)
# sds [![Build Status](https://travis-ci.com/AtlasOfLivingAustralia/sds.svg?branch#master)](https://travis-ci.com/AtlasOfLivingAustralia/sds)


The sensitive data service manages sensitivity concerns in the conservation and biosecurity areas.
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>au.org.ala</groupId>
<artifactId>sds</artifactId>
<version>1.4.6-SNAPSHOT</version>
<version>1.4.6</version>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/AtlasOfLivingAustralia/sds/issues</url>
</issueManagement>
<ciManagement>
<system>Travis</system>
<url>http://travis-ci.org/AtlasOfLivingAustralia/sds/</url>
<url>http://travis-ci.com/AtlasOfLivingAustralia/sds/</url>
</ciManagement>
<name>Sensitive Species Lookup API</name>
<description>Routines to check whether a species is sensitive and to apply data generalisation.</description>
Expand Down Expand Up @@ -56,7 +56,7 @@
<dependency>
<groupId>au.org.ala</groupId>
<artifactId>ala-name-matching</artifactId>
<version>3.4</version>
<version>3.5</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
12 changes: 7 additions & 5 deletions src/test/java/au/org/ala/sds/PlantPestEradicatedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public void papayaFruitFlyInPQADuringEradication() {
assertTrue(outcome.isLoadable());
//assertNotNull(outcome.getAnnotation());
assertNotNull(outcome.getReport().getAssertion());
assertEquals(MessageFactory.getMessageText(MessageFactory.PLANT_PEST_MSG_CAT2_A1, "Bactrocera (Bactrocera) dorsalis"),outcome.getReport().getAssertion());
// Current version of SDS does not include plant pest status and name index does not contain name
assertEquals(MessageFactory.getMessageText(MessageFactory.PLANT_PEST_MSG_CAT2_A1, "Bactrocera papayae"),outcome.getReport().getAssertion());
}

@Test
Expand All @@ -105,9 +106,8 @@ public void citrusCankerInPQABeforeEradication() {
assertTrue(outcome.isLoadable());
assertTrue(outcome.isControlledAccess());
//test for the correct messages
assertEquals(MessageFactory.getMessageText(MessageFactory.PLANT_PEST_MSG_CAT2_B1, "Xanthomonas citri (ex Hasse 1915) Gabriel et al. subsp. citri 2007","Emerald"),outcome.getReport().getAssertion());
assertTrue(outcome.getReport().getMessages().get(0).getMessageText().contains("Your record Xanthomonas citri (ex Hasse 1915) Gabriel et al. subsp. citri 2007,2004-01-29 and Emerald has been forwarded to a secure view with the Atlas of Living Australia"));

assertEquals(MessageFactory.getMessageText(MessageFactory.PLANT_PEST_MSG_CAT2_B1, "Xanthomonas axonopodis citri","Emerald"),outcome.getReport().getAssertion());
assertTrue(outcome.getReport().getMessages().get(0).getMessageText().contains("Xanthomonas axonopodis citri,2004-01-29 and Emerald has been forwarded to a secure view with the Atlas of Living Australia"));
}

@Test
Expand Down Expand Up @@ -162,6 +162,7 @@ public void citrusCankerAfterEradication() {

assertFalse(outcome.getReport().getMessagesByType(Message.Type.ALERT).isEmpty());

// Current version of SDS does not include plant pest status and name index does not contain name
assertTrue(outcome.getReport().getMessagesByType(Message.Type.ALERT).get(0).getMessageText().contains("previously considered eradicated from Australia, has been forwarded to Atlas of Living Australia from"));
assertTrue(outcome.getReport().getMessagesByType(Message.Type.WARNING).get(0).getMessageText().contains("This record has been determined to have plant biosecurity sensitivity because the pest is believed absent from Australia having been the subject of a successful eradication campaign"));
}
Expand All @@ -187,7 +188,8 @@ public void citrusCankerNoDate(){
assertTrue(outcome.isValid());
assertTrue(outcome.isLoadable());
assertTrue(outcome.isControlledAccess());
// Current version of SDS does not include plant pest status and name index does not contain name
assertTrue(outcome.getReport().getMessages().get(0).getMessageText().contains("and Emerald has been forwarded to a secure view with the Atlas of Living Australia"));
assertEquals(MessageFactory.getMessageText(MessageFactory.PLANT_PEST_MSG_CAT2_A1, "Xanthomonas citri (ex Hasse 1915) Gabriel et al. subsp. citri 2007"),outcome.getReport().getAssertion());
assertEquals(MessageFactory.getMessageText(MessageFactory.PLANT_PEST_MSG_CAT2_A1, "Xanthomonas axonopodis citri"),outcome.getReport().getAssertion());
}
}
2 changes: 1 addition & 1 deletion src/test/resources/sds-test.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Overriden properties for tests
name.index.dir=/data/lucene/namematching-20190213
name.index.dir=/data/lucene/namematching-20200214

0 comments on commit fd37804

Please sign in to comment.