def setUp(self): self.opts = testlib.parse([], {}, ".splunkrc") opts = self.opts.kwargs.copy() opts["basic"] = True opts["username"] = self.opts.kwargs["username"] opts["password"] = self.opts.kwargs["password"] self.context = binding.connect(**opts) import splunklib.client as client service = client.Service(**opts)
def setUp(self): self.opts = testlib.parse([], {}, ".splunkrc") self.context = binding.connect(**self.opts.kwargs) # Skip these tests if running below Splunk 6.2, cookie-auth didn't exist before import splunklib.client as client service = client.Service(**self.opts.kwargs) # TODO: Workaround the fact that skipTest is not defined by unittest2.TestCase service.login() splver = service.splunk_version if splver[:2] < (6, 2): self.skipTest("Skipping cookie-auth tests, running in %d.%d.%d, this feature was added in 6.2+" % splver)
def setUp(self): self.opts = testlib.parse([], {}, ".splunkrc") self.context = binding.connect(**self.opts.kwargs) # Skip these tests if running below Splunk 6.2, cookie-auth didn't exist before import splunklib.client as client service = client.Service(**self.opts.kwargs) # TODO: Workaround the fact that skipTest is not defined by unittest2.TestCase service.login() splver = service.splunk_version if splver[:2] < (6, 2): self.skipTest( "Skipping cookie-auth tests, running in %d.%d.%d, this feature was added in 6.2+" % splver)
def setUp(self): self.opts = testlib.parse([], {}, ".env") self.service = client.Service(**self.opts.kwargs)
def setUp(self): logging.info("%s", self.__class__.__name__) self.opts = testlib.parse([], {}, ".splunkrc") self.context = binding.connect(**self.opts.kwargs) logging.debug("Connected to splunkd.")
def setUp(self): self.opts = testlib.parse([], {}, ".splunkrc") self.service = client.Service(**self.opts.kwargs)