brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [1/2] brooklyn-server git commit: Bugfix. Move a test from src/main to src/test
Date Wed, 01 Mar 2017 14:59:00 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master fa7c38b16 -> a1ae7c0fc


Bugfix. Move a test from src/main to src/test


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/95917071
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/95917071
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/95917071

Branch: refs/heads/master
Commit: 959170714484787be80cc199ca3ac15fe3389b59
Parents: fa7c38b
Author: Valentin Aitken <bostko@gmail.com>
Authored: Wed Mar 1 16:56:50 2017 +0200
Committer: Valentin Aitken <bostko@gmail.com>
Committed: Wed Mar 1 16:56:50 2017 +0200

----------------------------------------------------------------------
 .../methods/FormatStringIntegrationTest.java    | 76 --------------------
 .../methods/FormatStringIntegrationTest.java    | 76 ++++++++++++++++++++
 2 files changed, 76 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/95917071/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/FormatStringIntegrationTest.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/FormatStringIntegrationTest.java
b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/FormatStringIntegrationTest.java
deleted file mode 100644
index ebdc640..0000000
--- a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/FormatStringIntegrationTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-package org.apache.brooklyn.camp.brooklyn.spi.dsl.methods;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.camp.brooklyn.AbstractYamlTest;
-import org.apache.brooklyn.entity.software.base.SameServerEntity;
-import org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.Test;
-
-import java.nio.file.Files;
-import java.nio.file.Path;
-
-import static org.testng.Assert.assertEquals;
-
-public class FormatStringIntegrationTest extends AbstractYamlTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(FormatStringIntegrationTest.class);
-
-    @Test(groups = "Integration")
-    public void testFormatString() throws Exception {
-
-        final Path tempFile = Files.createTempFile("testFormatString", ".txt");
-        LOG.info("Temp file is {}", tempFile.toAbsolutePath());
-
-        try {
-            Entity app = createAndStartApplication(
-                "location: localhost:(name=localhost)",
-                "services:",
-                "- type: " + SameServerEntity.class.getName(),
-                "  brooklyn.children:",
-                "  - type: " + VanillaSoftwareProcess.class.getName(),
-                "    id: sensorEntity",
-                "    launch.command: while true; do sleep 3600 ; done & echo $! >
${PID_FILE}",
-                "    brooklyn.initializers:",
-                "    - type: org.apache.brooklyn.core.sensor.ssh.SshCommandSensor",
-                "      brooklyn.config:",
-                "        name: greeting",
-                "        period: 2s",
-                "        command: echo world",
-                "  - type: " + VanillaSoftwareProcess.class.getName(),
-                "    id: consumerEntity",
-                "    launch.command: while true; do sleep 3600 ; done & echo $! >
${PID_FILE}",
-                "    shell.env:",
-                "      RESPONSE: $brooklyn:formatString(\"hello %s\", $brooklyn:entity(\"sensorEntity\").attributeWhenReady(\"greeting\"))",
-                "    post.launch.command: echo ${RESPONSE} > " + tempFile.toAbsolutePath()
-            );
-            waitForApplicationTasks(app);
-
-            final String contents = new String(Files.readAllBytes(tempFile)).trim();
-            assertEquals(contents, "hello world", "file contents: " + contents);
-
-        } finally {
-            Files.delete(tempFile);
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/95917071/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/FormatStringIntegrationTest.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/FormatStringIntegrationTest.java
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/FormatStringIntegrationTest.java
new file mode 100644
index 0000000..ebdc640
--- /dev/null
+++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/FormatStringIntegrationTest.java
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+package org.apache.brooklyn.camp.brooklyn.spi.dsl.methods;
+
+import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.camp.brooklyn.AbstractYamlTest;
+import org.apache.brooklyn.entity.software.base.SameServerEntity;
+import org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.Test;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+import static org.testng.Assert.assertEquals;
+
+public class FormatStringIntegrationTest extends AbstractYamlTest {
+
+    private static final Logger LOG = LoggerFactory.getLogger(FormatStringIntegrationTest.class);
+
+    @Test(groups = "Integration")
+    public void testFormatString() throws Exception {
+
+        final Path tempFile = Files.createTempFile("testFormatString", ".txt");
+        LOG.info("Temp file is {}", tempFile.toAbsolutePath());
+
+        try {
+            Entity app = createAndStartApplication(
+                "location: localhost:(name=localhost)",
+                "services:",
+                "- type: " + SameServerEntity.class.getName(),
+                "  brooklyn.children:",
+                "  - type: " + VanillaSoftwareProcess.class.getName(),
+                "    id: sensorEntity",
+                "    launch.command: while true; do sleep 3600 ; done & echo $! >
${PID_FILE}",
+                "    brooklyn.initializers:",
+                "    - type: org.apache.brooklyn.core.sensor.ssh.SshCommandSensor",
+                "      brooklyn.config:",
+                "        name: greeting",
+                "        period: 2s",
+                "        command: echo world",
+                "  - type: " + VanillaSoftwareProcess.class.getName(),
+                "    id: consumerEntity",
+                "    launch.command: while true; do sleep 3600 ; done & echo $! >
${PID_FILE}",
+                "    shell.env:",
+                "      RESPONSE: $brooklyn:formatString(\"hello %s\", $brooklyn:entity(\"sensorEntity\").attributeWhenReady(\"greeting\"))",
+                "    post.launch.command: echo ${RESPONSE} > " + tempFile.toAbsolutePath()
+            );
+            waitForApplicationTasks(app);
+
+            final String contents = new String(Files.readAllBytes(tempFile)).trim();
+            assertEquals(contents, "hello world", "file contents: " + contents);
+
+        } finally {
+            Files.delete(tempFile);
+        }
+    }
+}
+


Mime
View raw message