Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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)
Esempio n. 5
0
 def setUp(self):
     self.opts = testlib.parse([], {}, ".env")
     self.service = client.Service(**self.opts.kwargs)
Esempio 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.")
Esempio n. 7
0
 def setUp(self):
     self.opts = testlib.parse([], {}, ".splunkrc")
     self.service = client.Service(**self.opts.kwargs)
Esempio 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.")