Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
    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)
Exemplo n.º 5
0
 def setUp(self):
     self.opts = testlib.parse([], {}, ".env")
     self.service = client.Service(**self.opts.kwargs)
Exemplo n.º 6
0
 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.")
Exemplo n.º 7
0
 def setUp(self):
     self.opts = testlib.parse([], {}, ".splunkrc")
     self.service = client.Service(**self.opts.kwargs)
Exemplo n.º 8
0
 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.")