1
+ <?xml version =" 1.0" encoding =" utf-8" ?><testsuites name =" pytest tests" ><testsuite name =" pytest" errors =" 0" failures =" 1" skipped =" 0" tests =" 1" time =" 0.377" timestamp =" 2025-09-03T12:33:38.683850+02:00" hostname =" MPOLIWCZ-M-3NJ6" ><testcase classname =" tests.integration.test_macro.TestPrivilegesWithNamespace" name =" test_create_macro_no_admin" time =" 0.176" ><failure message =" splunklib.binding.HTTPError: HTTP 409 Conflict -- An object with name=SDKTestMacro already exists" >self = < test_macro.TestPrivilegesWithNamespace testMethod=test_create_macro_no_admin>
2
+
3
+ def test_create_macro_no_admin(self):
4
+ > self.service.macros.create(
5
+ self.macro_name, 'eval test="123"', namespace=self.namespace
6
+ )
7
+
8
+ tests/integration/test_macro.py:363:
9
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
10
+ splunklib/client.py:3644: in create
11
+ return Collection.create(self, name, definition=definition, **kwargs)
12
+ splunklib/client.py:1755: in create
13
+ response = self.post(name=name, **params)
14
+ splunklib/client.py:981: in post
15
+ return self.service.post(path, owner=owner, app=app, sharing=sharing, **query)
16
+ splunklib/binding.py:335: in wrapper
17
+ return request_fun(self, *args, **kwargs)
18
+ splunklib/binding.py:90: in new_f
19
+ val = f(*args, **kwargs)
20
+ splunklib/binding.py:856: in post
21
+ response = self.http.post(path, all_headers, **query)
22
+ splunklib/binding.py:1382: in post
23
+ return self.request(url, message)
24
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
25
+
26
+ self = < splunklib.binding.HttpLib object at 0x101d280a0> , url = UrlEncoded('https://localhost:8089/servicesNS/nobody/launcher/data/macros/')
27
+ message = {'body': b'name=SDKTestMacro& definition=eval+test%3D%22123%22', 'headers': [('Cookie', 'splunkd_8089=KgRkAxruIHVKU^LL_...K1LOsT3WAmmgC8xULxlGmQ0NBZhpLbR9G7Qo1H19WtacHgoD6HyKm7ENwQ227bVuFbfr5C5HlnbItLtzHtJJC9YSLhFGYi8bC')], 'method': 'POST'}
28
+ kwargs = {}
29
+ response = {'status': 409, 'reason': 'Conflict', 'headers': [('Date', 'Wed, 03 Sep 2025 10:33:38 GMT'), ('Expires', 'Thu, 26 Oct ...rame-Options', 'SAMEORIGIN'), ('Server', 'Splunkd')], 'body': < splunklib.binding.ResponseReader object at 0x101ee16d0> }
30
+
31
+ def request(self, url, message, **kwargs):
32
+ """Issues an HTTP request to a URL.
33
+
34
+ :param url: The URL.
35
+ :type url: ``string``
36
+ :param message: A dictionary with the format as described in
37
+ :class:`HttpLib`.
38
+ :type message: ``dict``
39
+ :param kwargs: Additional keyword arguments (optional). These arguments
40
+ are passed unchanged to the handler.
41
+ :type kwargs: ``dict``
42
+ :returns: A dictionary describing the response (see :class:`HttpLib` for
43
+ its structure).
44
+ :rtype: ``dict``
45
+ """
46
+ while True:
47
+ try:
48
+ response = self.handler(url, message, **kwargs)
49
+ break
50
+ except Exception:
51
+ if self.retries < = 0:
52
+ raise
53
+ else:
54
+ time.sleep(self.retryDelay)
55
+ self.retries -= 1
56
+ response = record(response)
57
+ if 400 < = response.status:
58
+ > raise HTTPError(response)
59
+ E splunklib.binding.HTTPError: HTTP 409 Conflict -- An object with name=SDKTestMacro already exists
60
+
61
+ splunklib/binding.py:1411: HTTPError</failure ></testcase ></testsuite ></testsuites >
0 commit comments