-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AUS-4050 Update package versions to improve security
- Loading branch information
Showing
2 changed files
with
23 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,8 @@ | |
import org.apache.http.HttpVersion; | ||
import org.apache.http.impl.DefaultHttpResponseFactory; | ||
import org.apache.http.message.BasicStatusLine; | ||
import org.apache.logging.log4j.Logger; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.auscope.portal.core.cloud.CloudFileInformation; | ||
import org.auscope.portal.core.services.cloud.CloudStorageService; | ||
import org.auscope.portal.core.test.PortalTestClass; | ||
|
@@ -51,14 +53,16 @@ public class ANVGLProvenanceServiceTest extends PortalTestClass { | |
final String activityFileName = "activity.ttl"; | ||
final String PROMSURI = "http://ec2-54-213-205-234.us-west-2.compute.amazonaws.com/id/report/"; | ||
final String mockUser = "[email protected]"; | ||
final Logger logger = LogManager.getLogger(ANVGLProvenanceServiceTest.class); | ||
URI mockProfileUrl; | ||
PortalUser mockPortalUser; | ||
|
||
List<VglDownload> downloads = new ArrayList<>(); | ||
VEGLJob turtleJob; | ||
|
||
final String initialTurtle = "<http://portal-fake.vgl.org/secure/getJobObject.do?jobId=1>" + "\n" + | ||
" a <http://www.w3.org/ns/prov#Activity> ;" + "\n"; | ||
" a <http://www.w3.org/ns/prov#Activity>;" + "\n"; | ||
final String initialTurtle2 = "<http://portal-fake.vgl.org>"; | ||
|
||
final String intermediateTurtle = | ||
" a <http://www.w3.org/ns/prov#Entity> ;" + System.lineSeparator() + | ||
|
@@ -162,17 +166,15 @@ public void tearDown() throws Exception { | |
public void testCreateActivity() throws Exception { | ||
String graph = anvglProvenanceService.createActivity(preparedJob, null, mockPortalUser); | ||
|
||
System.out.println("testCreateActivity"); | ||
System.out.println("GRAPH"); | ||
System.out.println(graph.toString()); | ||
System.out.println("INITIALTURTLE"); | ||
System.out.println(initialTurtle); | ||
|
||
System.out.println("DIFF: " + StringUtils.difference(graph, initialTurtle)); | ||
logger.debug("testCreateActivity"); | ||
logger.debug("GRAPH"); | ||
logger.debug(graph.toString()); | ||
logger.debug("INITIALTURTLE"); | ||
logger.debug(initialTurtle); | ||
|
||
logger.debug("DIFF: " + StringUtils.difference(graph, initialTurtle)); | ||
Assert.assertTrue(graph.contains(initialTurtle)); | ||
Assert.assertTrue(graph.contains(serviceTurtle)); | ||
//Assert.assertTrue(graph.contains(intermediateTurtle)); | ||
} | ||
|
||
@Test | ||
|
@@ -253,13 +255,10 @@ public void testSetFromModel() throws Exception { | |
StringWriter out = new StringWriter(); | ||
activity.getGraph().write(out, "TURTLE", serverURL); | ||
String turtle = out.toString(); | ||
logger.debug(turtle); | ||
|
||
System.out.println(turtle); | ||
|
||
//Assert.assertTrue(turtle.contains(initialTurtle)); | ||
Assert.assertTrue(turtle.contains(initialTurtle)); | ||
Assert.assertTrue(turtle.contains(initialTurtle.substring(0, 27))); | ||
Assert.assertTrue(turtle.contains(endedTurtle)); | ||
//Assert.assertTrue(turtle.contains(file1Turtle)); | ||
Assert.assertTrue(turtle.contains(outputURL)); | ||
} | ||
} | ||
|