You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2021/01/28 11:57:03 UTC

[cassandra] branch trunk updated: In cqlshlib tests, don't overwrite the environment and improve hostname matching

This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 91cb934  In cqlshlib tests, don't overwrite the environment and improve hostname matching
91cb934 is described below

commit 91cb934e25020f83dcb289be9c03292579b5d33b
Author: jacek-lewandowski <ja...@datastax.com>
AuthorDate: Wed Jan 27 15:12:30 2021 +0100

    In cqlshlib tests, don't overwrite the environment and improve hostname matching
    
     patch by Jacek Lewandowski; reviewed by Mick Semb Wever for CASSANDRA-16409
---
 pylib/cqlshlib/test/test_cqlsh_completion.py | 2 +-
 pylib/cqlshlib/test/test_cqlsh_output.py     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pylib/cqlshlib/test/test_cqlsh_completion.py b/pylib/cqlshlib/test/test_cqlsh_completion.py
index d432f22..6fe94dd 100644
--- a/pylib/cqlshlib/test/test_cqlsh_completion.py
+++ b/pylib/cqlshlib/test/test_cqlsh_completion.py
@@ -52,7 +52,7 @@ class CqlshCompletionCase(BaseTestCase):
         remove_db()
 
     def setUp(self):
-        env = os.environ
+        env = os.environ.copy()
         env['COLUMNS'] = '100000'
         if (locale.getpreferredencoding() != 'UTF-8'):
              env['LC_CTYPE'] = 'en_US.utf8'
diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py b/pylib/cqlshlib/test/test_cqlsh_output.py
index 4962167..324587d 100644
--- a/pylib/cqlshlib/test/test_cqlsh_output.py
+++ b/pylib/cqlshlib/test/test_cqlsh_output.py
@@ -47,7 +47,7 @@ class TestCqlshOutput(BaseTestCase):
         remove_db()
 
     def setUp(self):
-        env = os.environ
+        env = os.environ.copy()
         env['COLUMNS'] = '100000'
         # carry forward or override locale LC_CTYPE for UTF-8 encoding
         if (locale.getpreferredencoding() != 'UTF-8'):
@@ -737,7 +737,7 @@ class TestCqlshOutput(BaseTestCase):
         ringinfo_re = r'''
             Range[ ]ownership: \n
             (
-              [ ] .*? [ ][ ] \[ / ( \d+ \. ){3} \d+ : \d+ \] \n
+              [ ] .*? [ ][ ] \[ .*? / ( \d+ \. ){3} \d+ : \d+ \] \n
             )+
             \n
         '''


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org