geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r683623 - in /geronimo/server/trunk: framework/configs/shutdown/ testsuite/commands-testsuite/shutdown/ testsuite/commands-testsuite/shutdown/src/ testsuite/commands-testsuite/shutdown/src/test/ testsuite/commands-testsuite/shutdown/src/tes...
Date Thu, 07 Aug 2008 14:47:50 GMT
Author: gawor
Date: Thu Aug  7 07:47:49 2008
New Revision: 683623

URL: http://svn.apache.org/viewvc?rev=683623&view=rev
Log:
fixed shutdown command and added basic tests to verify it's working ok

Added:
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/goals.txt   (with props)
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/pom.xml   (with props)
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/testsuite/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/testsuite/shutdown/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/testsuite/shutdown/ShutdownTest.java
  (with props)
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/resources/
    geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/resources/testng.xml
  (with props)
Modified:
    geronimo/server/trunk/framework/configs/shutdown/pom.xml

Modified: geronimo/server/trunk/framework/configs/shutdown/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/shutdown/pom.xml?rev=683623&r1=683622&r2=683623&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/shutdown/pom.xml (original)
+++ geronimo/server/trunk/framework/configs/shutdown/pom.xml Thu Aug  7 07:47:49 2008
@@ -121,6 +121,10 @@
                             <groupId>log4j</groupId>
                             <artifactId>log4j</artifactId>
                         </element>
+                        <element>
+                            <groupId>org.apache.xbean</groupId>
+                            <artifactId>xbean-reflect</artifactId>
+                        </element>
                     </classpath>
                     <classpathPrefix>../lib</classpathPrefix>
                     <category>Geronimo Core</category>

Added: geronimo/server/trunk/testsuite/commands-testsuite/shutdown/goals.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/commands-testsuite/shutdown/goals.txt?rev=683623&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/commands-testsuite/shutdown/goals.txt (added)
+++ geronimo/server/trunk/testsuite/commands-testsuite/shutdown/goals.txt Thu Aug  7 07:47:49
2008
@@ -0,0 +1 @@
+clean install

Propchange: geronimo/server/trunk/testsuite/commands-testsuite/shutdown/goals.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/testsuite/commands-testsuite/shutdown/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/commands-testsuite/shutdown/pom.xml?rev=683623&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/commands-testsuite/shutdown/pom.xml (added)
+++ geronimo/server/trunk/testsuite/commands-testsuite/shutdown/pom.xml Thu Aug  7 07:47:49
2008
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.testsuite</groupId>
+        <artifactId>commands-testsuite</artifactId>
+        <version>2.2-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>shutdown</artifactId>
+    <name>Geronimo TestSuite :: Commands Testsuite :: Shutdown</name>
+
+    <description>
+        Test for the shutdown.bat/sh
+    </description>
+
+</project>

Propchange: geronimo/server/trunk/testsuite/commands-testsuite/shutdown/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/testsuite/shutdown/ShutdownTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/testsuite/shutdown/ShutdownTest.java?rev=683623&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/testsuite/shutdown/ShutdownTest.java
(added)
+++ geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/testsuite/shutdown/ShutdownTest.java
Thu Aug  7 07:47:49 2008
@@ -0,0 +1,66 @@
+/**
+ *  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.geronimo.testsuite.shutdown;
+
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.geronimo.testsupport.commands.CommandTestSupport;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+@Test
+public class ShutdownTest extends CommandTestSupport {
+
+    protected String execute(String[] args) throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        List<String> cmd = new ArrayList<String>();
+        if (args != null) {
+            cmd.addAll(Arrays.asList(args));
+        }
+        execute("shutdown", cmd, null, baos);
+        return baos.toString();
+    }
+        
+    @Test
+    public void testBadPassword() throws Exception {
+        String[] args = new String[]{ "--user", "system", "--password", "FOO" };
+ 
+        String output = execute(args);
+
+        if (output.indexOf("Invalid login") < 0) {
+            Assert.fail(output);
+        }
+    }
+    
+    @Test
+    public void testBadUsername() throws Exception {
+        String[] args = new String[]{ "--user", "FOO", "--password", "manager" };
+ 
+        String output = execute(args);
+
+        if (output.indexOf("Invalid login") < 0) {
+            Assert.fail(output);
+        }
+    }
+        
+}

Propchange: geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/java/org/apache/geronimo/testsuite/shutdown/ShutdownTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/resources/testng.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/resources/testng.xml?rev=683623&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/resources/testng.xml
(added)
+++ geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/resources/testng.xml
Thu Aug  7 07:47:49 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- $Rev: 514087 $ $Date: 2007-03-03 14:13:40 +0800 (Sat, 03 Mar 2007) $ -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+
+<suite name="Suite1" verbose="1">
+    <test name="commands-testsuite.shutdown">
+        <packages>
+            <package name="org.apache.geronimo.testsuite.shutdown"/>
+        </packages>
+    </test>
+</suite>
+

Propchange: geronimo/server/trunk/testsuite/commands-testsuite/shutdown/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message