v0.2.52..v0.2.53 changeset ExternalCommandRunnerImplTest.java
Garret Voltz edited this page Feb 12, 2020
·
1 revision
diff --git a/hoot-services/src/test/java/hoot/services/command/ExternalCommandRunnerImplTest.java b/hoot-services/src/test/java/hoot/services/command/ExternalCommandRunnerImplTest.java
index 71d5c69..16ef309 100644
--- a/hoot-services/src/test/java/hoot/services/command/ExternalCommandRunnerImplTest.java
+++ b/hoot-services/src/test/java/hoot/services/command/ExternalCommandRunnerImplTest.java
@@ -22,14 +22,14 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
package hoot.services.command;
-import static hoot.services.HootProperties.OSMAPI_DB_URL;
-import static org.junit.Assert.assertEquals;
import static hoot.services.HootProperties.HOME_FOLDER;
import static hoot.services.HootProperties.HOOTAPI_DB_URL;
+import static hoot.services.HootProperties.OSMAPI_DB_URL;
+import static org.junit.Assert.assertEquals;
import java.util.HashMap;
import java.util.LinkedList;
@@ -134,7 +134,20 @@ public class ExternalCommandRunnerImplTest {
String expected5 = " Applying operation: hoot::BuildingOutlineRemoveOp...\n";
assertEquals(expected5, runner.obfuscateConsoleLog(test5));
-//
+ }
+
+
+ @Test
+ public void obfuscate2() {
+ ExternalCommandRunnerImpl runner = new ExternalCommandRunnerImpl();
+ String test = "hoot changeset-apply --info -D changeset.description=test cut and replace for node snapping at edges -D changeset.hashtags=#hootenanny -D changeset.source=OSM_077953 -D hoot.osm.auth.access.token=SlN0M6VfCBsU044ug44r2nf8dW2o4pFvyTd89JeD -D hoot.osm.auth.access.token.secret=9Hz2B8PZki8UsVPLpI3NUWrAbsIkvo3qQ1i6aHKZ -D hoot.osm.auth.consumer.key=yyawGlA9IeCxK8eDgkInh3lB9EgGDyXECmlv6es6 -D hoot.osm.auth.consumer.secret=1YT1f1aLhIDCloSYkOnwZRfTVH5tl9BIKwQ300eR /home/vagrant/hoot/userfiles/changesets/grail_cdf5650285354566ac4ff7d19d54d360/diff.osc";
+ String expected = "hoot changeset-apply --info -D changeset.description=test cut and replace for node snapping at edges -D changeset.hashtags=#hootenanny -D changeset.source=OSM_077953 -D hoot.osm.auth.access.token=<redacted> -D hoot.osm.auth.access.token.secret=<redacted> -D hoot.osm.auth.consumer.key=<redacted> -D hoot.osm.auth.consumer.secret=<redacted> <path>/userfiles/changesets/grail_cdf5650285354566ac4ff7d19d54d360/diff.osc";
+ assertEquals(expected, runner.obfuscateConsoleLog(test));
+
+ test = "STATUS Error uploading changeset: 49514460 - Error transferring http://internal-me-test-995734160.us-east-1.elb.amazonaws.com/api/0.6/changeset/49514460/upload - server replied: Conflict (409) ";
+ expected = "STATUS Error uploading changeset: 49514460 - Error transferring <osmapi>/api/0.6/changeset/49514460/upload - server replied: Conflict (409) ";
+ assertEquals(expected, runner.obfuscateConsoleLog(test));
+
}
}