brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/3] brooklyn-server git commit: Renamed to MachineDetailsIntegrationTest
Date Tue, 18 Apr 2017 13:44:07 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master f3d2eed56 -> d5fbc654c


Renamed to MachineDetailsIntegrationTest


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

Branch: refs/heads/master
Commit: ee0cabde0e2da32a5ba60c2312432baa3e847b25
Parents: d407e5e
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue Apr 18 10:03:13 2017 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Tue Apr 18 11:36:49 2017 +0100

----------------------------------------------------------------------
 .../location/MachineDetailsIntegrationTest.java | 83 ++++++++++++++++++++
 .../core/location/MachineDetailsTest.java       | 83 --------------------
 2 files changed, 83 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ee0cabde/core/src/test/java/org/apache/brooklyn/core/location/MachineDetailsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/location/MachineDetailsIntegrationTest.java
b/core/src/test/java/org/apache/brooklyn/core/location/MachineDetailsIntegrationTest.java
new file mode 100644
index 0000000..e54cb08
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/core/location/MachineDetailsIntegrationTest.java
@@ -0,0 +1,83 @@
+/*
+ * 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.core.location;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotNull;
+
+import java.util.Arrays;
+
+import org.apache.brooklyn.api.location.LocationSpec;
+import org.apache.brooklyn.api.location.MachineDetails;
+import org.apache.brooklyn.api.location.OsDetails;
+import org.apache.brooklyn.api.mgmt.ManagementContext;
+import org.apache.brooklyn.api.mgmt.Task;
+import org.apache.brooklyn.core.entity.Entities;
+import org.apache.brooklyn.core.location.BasicMachineDetails;
+import org.apache.brooklyn.core.test.entity.TestApplication;
+import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
+import org.apache.brooklyn.location.ssh.SshMachineLocation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class MachineDetailsIntegrationTest {
+
+    private static final Logger LOG = LoggerFactory.getLogger(MachineDetailsIntegrationTest.class);
+
+    TestApplication app;
+    ManagementContext mgmt;
+    SshMachineLocation host;
+
+    @BeforeMethod(alwaysRun=true)
+    public void setup() throws Exception {
+        app = TestApplication.Factory.newManagedInstanceForTests();
+        mgmt = app.getManagementContext();
+
+        LocalhostMachineProvisioningLocation localhost = mgmt.getLocationManager().createLocation(
+                LocationSpec.create(LocalhostMachineProvisioningLocation.class));
+        host = localhost.obtain();
+        app.start(Arrays.asList(host));
+    }
+
+    @AfterMethod(alwaysRun=true)
+    public void tearDown() throws Exception {
+        if (mgmt != null) Entities.destroyAll(mgmt);
+        mgmt = null;
+    }
+
+    @Test(groups = "Integration")
+    public void testGetMachineDetails() {
+        Task<BasicMachineDetails> detailsTask = app.getExecutionContext().submit(
+                BasicMachineDetails.taskForSshMachineLocation(host));
+        MachineDetails machine = detailsTask.getUnchecked();
+        LOG.info("Found the following on localhost: {}", machine);
+        assertNotNull(machine);
+        OsDetails details = machine.getOsDetails();
+        assertNotNull(details);
+        assertNotNull(details.getArch());
+        assertNotNull(details.getName());
+        assertNotNull(details.getVersion());
+        assertFalse(details.getArch().startsWith("architecture:"), "architecture prefix not
removed from details");
+        assertFalse(details.getName().startsWith("name:"), "name prefix not removed from
details");
+        assertFalse(details.getVersion().startsWith("version:"), "version prefix not removed
from details");
+    }
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ee0cabde/core/src/test/java/org/apache/brooklyn/core/location/MachineDetailsTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/location/MachineDetailsTest.java
b/core/src/test/java/org/apache/brooklyn/core/location/MachineDetailsTest.java
deleted file mode 100644
index d45547e..0000000
--- a/core/src/test/java/org/apache/brooklyn/core/location/MachineDetailsTest.java
+++ /dev/null
@@ -1,83 +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.core.location;
-
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-
-import java.util.Arrays;
-
-import org.apache.brooklyn.api.location.LocationSpec;
-import org.apache.brooklyn.api.location.MachineDetails;
-import org.apache.brooklyn.api.location.OsDetails;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.api.mgmt.Task;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.location.BasicMachineDetails;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-public class MachineDetailsTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(MachineDetailsTest.class);
-
-    TestApplication app;
-    ManagementContext mgmt;
-    SshMachineLocation host;
-
-    @BeforeMethod(alwaysRun=true)
-    public void setup() throws Exception {
-        app = TestApplication.Factory.newManagedInstanceForTests();
-        mgmt = app.getManagementContext();
-
-        LocalhostMachineProvisioningLocation localhost = mgmt.getLocationManager().createLocation(
-                LocationSpec.create(LocalhostMachineProvisioningLocation.class));
-        host = localhost.obtain();
-        app.start(Arrays.asList(host));
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void tearDown() throws Exception {
-        if (mgmt != null) Entities.destroyAll(mgmt);
-        mgmt = null;
-    }
-
-    @Test(groups = "Integration")
-    public void testGetMachineDetails() {
-        Task<BasicMachineDetails> detailsTask = app.getExecutionContext().submit(
-                BasicMachineDetails.taskForSshMachineLocation(host));
-        MachineDetails machine = detailsTask.getUnchecked();
-        LOG.info("Found the following on localhost: {}", machine);
-        assertNotNull(machine);
-        OsDetails details = machine.getOsDetails();
-        assertNotNull(details);
-        assertNotNull(details.getArch());
-        assertNotNull(details.getName());
-        assertNotNull(details.getVersion());
-        assertFalse(details.getArch().startsWith("architecture:"), "architecture prefix not
removed from details");
-        assertFalse(details.getName().startsWith("name:"), "name prefix not removed from
details");
-        assertFalse(details.getVersion().startsWith("version:"), "version prefix not removed
from details");
-    }
-}


Mime
View raw message