Browse Source

Merge "Support to verify https url"

tags/2.0.0
Zuul 1 week ago
parent
commit
1716139e96
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      rally/plugins/common/types.py
  2. 1
    1
      tests/unit/plugins/common/test_types.py

+ 1
- 1
rally/plugins/common/types.py View File

@@ -30,7 +30,7 @@ class PathOrUrl(types.ResourceType):
30 30
         if os.path.isfile(path):
31 31
             return path
32 32
         try:
33
-            head = requests.head(path)
33
+            head = requests.head(path, verify=False)
34 34
             if head.status_code == 200:
35 35
                 return path
36 36
             raise exceptions.InvalidScenarioArgument(

+ 1
- 1
tests/unit/plugins/common/test_types.py View File

@@ -37,7 +37,7 @@ class PathOrUrlTestCase(test.TestCase):
37 37
         self.assertRaises(exceptions.InvalidScenarioArgument,
38 38
                           types.PathOrUrl({}, {}).pre_process,
39 39
                           "fake_path", {})
40
-        mock_requests_head.assert_called_once_with("fake_path")
40
+        mock_requests_head.assert_called_once_with("fake_path", verify=False)
41 41
 
42 42
     @mock.patch("os.path.isfile")
43 43
     @mock.patch("requests.head")

Loading…
Cancel
Save