apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject incubator-apex-core git commit: APEX-198 Modify test to create user directory under target.
Date Tue, 20 Oct 2015 23:10:13 GMT
Repository: incubator-apex-core
Updated Branches:
  refs/heads/release-3.2 979a0efd2 -> 5a90bb701


APEX-198 Modify test to create user directory under target.


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/5a90bb70
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/5a90bb70
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/5a90bb70

Branch: refs/heads/release-3.2
Commit: 5a90bb701cafde8c88ce69645496a082c04d7fcf
Parents: 979a0ef
Author: David Yan <david@datatorrent.com>
Authored: Tue Oct 20 14:50:02 2015 -0700
Committer: Thomas Weise <thomas@datatorrent.com>
Committed: Tue Oct 20 15:51:53 2015 -0700

----------------------------------------------------------------------
 .../com/datatorrent/stram/cli/DTCliTest.java    |  7 +++-
 .../resources/testAppPackage/.dt/dt-site.xml    | 39 --------------------
 .../test/resources/testAppPackage/dt-site.xml   | 39 ++++++++++++++++++++
 3 files changed, 44 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/5a90bb70/engine/src/test/java/com/datatorrent/stram/cli/DTCliTest.java
----------------------------------------------------------------------
diff --git a/engine/src/test/java/com/datatorrent/stram/cli/DTCliTest.java b/engine/src/test/java/com/datatorrent/stram/cli/DTCliTest.java
index f8e1789..59a45aa 100644
--- a/engine/src/test/java/com/datatorrent/stram/cli/DTCliTest.java
+++ b/engine/src/test/java/com/datatorrent/stram/cli/DTCliTest.java
@@ -64,7 +64,10 @@ public class DTCliTest
   {
     try {
       userHome = System.getProperty("user.home");
-      env.put("HOME", System.getProperty("user.dir") + "/src/test/resources/testAppPackage");
+      String newHome = System.getProperty("user.dir") + "/target";
+      FileUtils.forceMkdir(new File(newHome + "/.dt"));
+      FileUtils.copyFile(new File(System.getProperty("user.dir") + "/src/test/resources/testAppPackage/dt-site.xml"),
new File(newHome + "/.dt/dt-site.xml"));
+      env.put("HOME", newHome);
       setEnv(env);
 
       cli.init();
@@ -83,7 +86,7 @@ public class DTCliTest
   public static void finished()
   {
     try {
-      env.put("HOME", System.getProperty("user.dir") + userHome);
+      env.put("HOME", userHome);
       setEnv(env);
 
       StramTestSupport.removeAppPackageFile();

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/5a90bb70/engine/src/test/resources/testAppPackage/.dt/dt-site.xml
----------------------------------------------------------------------
diff --git a/engine/src/test/resources/testAppPackage/.dt/dt-site.xml b/engine/src/test/resources/testAppPackage/.dt/dt-site.xml
deleted file mode 100644
index f247ac9..0000000
--- a/engine/src/test/resources/testAppPackage/.dt/dt-site.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-
--->
-<configuration>
-  <property>
-    <name>dt.test.1</name>
-    <value>user-home-config</value>
-  </property>
-  <property>
-    <name>dt.test.2</name>
-    <value>user-home-config</value>
-  </property>
-  <property>
-    <name>dt.test.3</name>
-    <value>user-home-config</value>
-  </property>
-  <property>
-    <name>dt.test.4</name>
-    <value>user-home-config</value>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/5a90bb70/engine/src/test/resources/testAppPackage/dt-site.xml
----------------------------------------------------------------------
diff --git a/engine/src/test/resources/testAppPackage/dt-site.xml b/engine/src/test/resources/testAppPackage/dt-site.xml
new file mode 100644
index 0000000..f247ac9
--- /dev/null
+++ b/engine/src/test/resources/testAppPackage/dt-site.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<configuration>
+  <property>
+    <name>dt.test.1</name>
+    <value>user-home-config</value>
+  </property>
+  <property>
+    <name>dt.test.2</name>
+    <value>user-home-config</value>
+  </property>
+  <property>
+    <name>dt.test.3</name>
+    <value>user-home-config</value>
+  </property>
+  <property>
+    <name>dt.test.4</name>
+    <value>user-home-config</value>
+  </property>
+</configuration>


Mime
View raw message