Browse Source

Default insecure to false in sample config

In PR [1] the default for insecure was set to False.  This commit
updates the sample configuration file to match that default.

NOTE: We also mock out test_insecure as is done in test_secure so that
      the test doesn't actually rely on what is set in openstack.ini to
      pass.

[1] https://review.openstack.org/#/c/474366/

Change-Id: I5257be8cfb9483ac7dd02b893e4a22a2ee46bbf7
changes/36/476936/3
Matt Thompson 2 years ago
parent
commit
d99b674500
2 changed files with 6 additions and 5 deletions
  1. 1
    1
      etc/openstack.ini
  2. 5
    4
      tests/unit/test_os_utils.py

+ 1
- 1
etc/openstack.ini View File

@@ -7,7 +7,7 @@
7 7
 # Allow insecure TLS (https) requests.
8 8
 #   If your SSL certificate is not valid set this option to true,
9 9
 #   else omit it or set it false.
10
-insecure = true
10
+insecure = false
11 11
 
12 12
 auth_url = https://127.0.0.1:5000/v3
13 13
 

+ 5
- 4
tests/unit/test_os_utils.py View File

@@ -154,10 +154,11 @@ class TestOSUtilsConnection(unittest.TestCase):
154 154
 
155 155
     def test_insecure(self):
156 156
         """Test True insecure value."""
157
-        self.osu = os_utils.OpenStack(
158
-            os_auth_args=self.config
159
-        )
160
-        self.assertFalse(self.osu.verify)
157
+        with mock.patch.dict(self.config, {'insecure': 'True'}):
158
+            self.osu = os_utils.OpenStack(
159
+                os_auth_args=self.config
160
+            )
161
+            self.assertFalse(self.osu.verify)
161 162
 
162 163
     def test_secure(self):
163 164
         """Test False insecure value."""

Loading…
Cancel
Save