You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ch...@apache.org on 2014/07/14 19:29:40 UTC

git commit: change cli test ports

Repository: stratos
Updated Branches:
  refs/heads/master 1811dd5a5 -> 9a1964d28


change cli test ports


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9a1964d2
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9a1964d2
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9a1964d2

Branch: refs/heads/master
Commit: 9a1964d289a56122be3a85f74971100a4ef66716
Parents: 1811dd5
Author: Chris Snow <ch...@apache.org>
Authored: Mon Jul 14 17:28:34 2014 +0000
Committer: Chris Snow <ch...@apache.org>
Committed: Mon Jul 14 17:28:34 2014 +0000

----------------------------------------------------------------------
 components/org.apache.stratos.cli/pom.xml            | 15 +++++++++------
 .../src/test/python/test_common.py                   | 10 +++++-----
 .../src/test/python/test_interactive.py              |  2 +-
 3 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/9a1964d2/components/org.apache.stratos.cli/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/pom.xml b/components/org.apache.stratos.cli/pom.xml
index 1643665..d8e1789 100644
--- a/components/org.apache.stratos.cli/pom.xml
+++ b/components/org.apache.stratos.cli/pom.xml
@@ -220,8 +220,9 @@
 										<PYTHONPATH>../../main/python:${project.build.directory}/pexpect-3.2:$PYTHONPATH</PYTHONPATH>
 										<CLI_JAR>${project.build.directory}/${project.build.finalName}.jar</CLI_JAR>
 										<WIREMOCK_JAR>${project.build.directory}/dependency/wiremock-${wiremock.version}-standalone.jar</WIREMOCK_JAR>
-										<WIREMOCK_HTTP_PORT>8080</WIREMOCK_HTTP_PORT>
-										<WIREMOCK_HTTPS_PORT>9443</WIREMOCK_HTTPS_PORT>
+										<!-- Use uncommon ports to prevent conflict on jenkins -->
+										<WIREMOCK_HTTP_PORT>3448</WIREMOCK_HTTP_PORT>
+										<WIREMOCK_HTTPS_PORT>3449</WIREMOCK_HTTPS_PORT>
 									</environmentVariables>
 								</configuration>
 								<id>python-test-common</id>
@@ -242,8 +243,9 @@
 										<PYTHONPATH>../../main/python:${project.build.directory}/pexpect-3.2:$PYTHONPATH</PYTHONPATH>
 										<CLI_JAR>${project.build.directory}/${project.build.finalName}.jar</CLI_JAR>
 										<WIREMOCK_JAR>${project.build.directory}/dependency/wiremock-${wiremock.version}-standalone.jar</WIREMOCK_JAR>
-										<WIREMOCK_HTTP_PORT>8080</WIREMOCK_HTTP_PORT>
-										<WIREMOCK_HTTPS_PORT>9443</WIREMOCK_HTTPS_PORT>
+										<!-- Use uncommon ports to prevent conflict on jenkins -->
+										<WIREMOCK_HTTP_PORT>3448</WIREMOCK_HTTP_PORT>
+										<WIREMOCK_HTTPS_PORT>3449</WIREMOCK_HTTPS_PORT>
 									</environmentVariables>
 								</configuration>
 								<id>python-test-interactive</id>
@@ -264,8 +266,9 @@
 										<PYTHONPATH>../../main/python:${project.build.directory}/pexpect-3.2:$PYTHONPATH</PYTHONPATH>
 										<CLI_JAR>${project.build.directory}/${project.build.finalName}.jar</CLI_JAR>
 										<WIREMOCK_JAR>${project.build.directory}/dependency/wiremock-${wiremock.version}-standalone.jar</WIREMOCK_JAR>
-										<WIREMOCK_HTTP_PORT>8080</WIREMOCK_HTTP_PORT>
-										<WIREMOCK_HTTPS_PORT>9443</WIREMOCK_HTTPS_PORT>
+										<!-- Use uncommon ports to prevent conflict on jenkins -->
+										<WIREMOCK_HTTP_PORT>3448</WIREMOCK_HTTP_PORT>
+										<WIREMOCK_HTTPS_PORT>3449</WIREMOCK_HTTPS_PORT>
 									</environmentVariables>
 								</configuration>
 								<id>python-test-noninteractive</id>

http://git-wip-us.apache.org/repos/asf/stratos/blob/9a1964d2/components/org.apache.stratos.cli/src/test/python/test_common.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/test/python/test_common.py b/components/org.apache.stratos.cli/src/test/python/test_common.py
index a8ab3c3..822e7f1 100755
--- a/components/org.apache.stratos.cli/src/test/python/test_common.py
+++ b/components/org.apache.stratos.cli/src/test/python/test_common.py
@@ -52,13 +52,13 @@ class TestCommon(unittest.TestCase):
 
     def test_error_if_stratos_url_not_set(self):
         if 'STRATOS_URL' in os.environ: del os.environ["STRATOS_URL"]      # unset env var
-        child = pexpect.spawn(TestCommon.cli_cmd)
+        child = pexpect.spawn(TestCommon.cli_cmd, timeout=10)
         child.expect ('Could not find required "STRATOS_URL" variable in your environment.')
         child.expect (pexpect.EOF)
 
     def test_error_if_port_not_provided_in_stratos_url(self):
         os.environ["STRATOS_URL"] = "https://localhost"  # no port
-        child = pexpect.spawn(TestCommon.cli_cmd)
+        child = pexpect.spawn(TestCommon.cli_cmd, timeout=10)
         child.expect ('The "STRATOS_URL" variable in your environment is not a valid URL. You have provided "https://localhost"')
         child.expect ('Please provide the Stratos Controller URL as follows')
         child.expect ('https://<host>:<port>')
@@ -66,7 +66,7 @@ class TestCommon(unittest.TestCase):
 
     def test_error_if_context_path_is_provided_in_stratos_url(self):
         os.environ["STRATOS_URL"] = "https://localhost:1234/somecontext/" # context path
-        child = pexpect.spawn(TestCommon.cli_cmd)
+        child = pexpect.spawn(TestCommon.cli_cmd, timeout=10)
         child.expect ('The "STRATOS_URL" variable in your environment is not a valid URL. You have provided "https://localhost:1234/somecontext/"')
         child.expect ('Please provide the Stratos Controller URL as follows')
         child.expect ('https://<host>:<port>')
@@ -74,7 +74,7 @@ class TestCommon(unittest.TestCase):
 
     def test_error_if_non_https_scheme_is_provided_in_stratos_url(self):
         os.environ["STRATOS_URL"] = "http://localhost:1234" # http scheme
-        child = pexpect.spawn(TestCommon.cli_cmd)
+        child = pexpect.spawn(TestCommon.cli_cmd, timeout=10)
         child.expect ('The "STRATOS_URL" variable in your environment is not a valid URL. You have provided "http://localhost:1234"')
         child.expect ('Please provide the Stratos Controller URL as follows')
         child.expect ('https://<host>:<port>')
@@ -83,7 +83,7 @@ class TestCommon(unittest.TestCase):
     def test_error_if_invalid_format_is_given_for_stratos_url(self):
         # we need to ensure the url is valid and not that it just has 2 colons and 3 or less slashes!
         os.environ["STRATOS_URL"] = ":://"
-        child = pexpect.spawn(TestCommon.cli_cmd)
+        child = pexpect.spawn(TestCommon.cli_cmd, timeout=10)
         child.expect ('The "STRATOS_URL" variable in your environment is not a valid URL. You have provided ":://"')
         child.expect ('Please provide the Stratos Controller URL as follows')
         child.expect ('https://<host>:<port>')

http://git-wip-us.apache.org/repos/asf/stratos/blob/9a1964d2/components/org.apache.stratos.cli/src/test/python/test_interactive.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/test/python/test_interactive.py b/components/org.apache.stratos.cli/src/test/python/test_interactive.py
index 5a0d8e7..8a17e7f 100755
--- a/components/org.apache.stratos.cli/src/test/python/test_interactive.py
+++ b/components/org.apache.stratos.cli/src/test/python/test_interactive.py
@@ -55,7 +55,7 @@ class TestInteractive(unittest.TestCase):
         TestInteractive.wiremock.reset()
 
     def test_interactive_mode_username_and_password_sent_to_server(self):
-        child = pexpect.spawn(TestInteractive.cli_cmd)
+        child = pexpect.spawn(TestInteractive.cli_cmd, timeout=10)
         child.expect   ('Username: ')
         child.sendline ('1234')
         child.expect   ('Password: ')