splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

Test Suite Doesn't Pass

Open meunierd opened this issue 11 years ago • 6 comments

Is this a known issue? I get countless AttributeErrors thrown:

AttributeError: 'StubbedReportingCommand' object has no attribute '_option_view'

In addition to this, the suite itself seems to take forever to run. It's been at least a half hour and it hasn't finished. I have the need to make modifications to the SDK but I have no baseline for what a working SDK actually is because the test suite doesn't pass.

meunierd avatar Jun 19 '15 13:06 meunierd

Hi @meunierd,

We are aware of some failing tests in the searchcommands sub-package, you can safely ignore those at this time. We are working on getting them fixed.

Are you running the tests against a remote Splunk server? The full test suite usually takes 10-12 minutes to run, but can take longer if the machine is underpowered, or if running the tests against a remove Splunk server. Running the tests on Windows can take significantly longer, as well.

shakeelmohamed avatar Jun 19 '15 16:06 shakeelmohamed

I'm running against splunkcloud. Something like 10% of tests fail. We're willing to do the work for a Python 3 port but we have no way to know what we're breaking without a working test suite.

meunierd avatar Jun 19 '15 17:06 meunierd

@meunierd Another reason you're probably seeing some tests failures is because you don't have our private sdk-app-collection app installed. We appreciate your willingness to work on the Python 3 port, please read some of the notes in #91 if you haven't yet.

Thanks for your patience

shakeelmohamed avatar Jun 19 '15 22:06 shakeelmohamed

We've overhauled the searchcommands test suite in preparation for the next Python SDK release which includes a number of new features/bug fixes. These changes should address your test run issue. See CHANGELOG.md on the develop branch for additional information.

David-Noble-at-work avatar Sep 24 '15 17:09 David-Noble-at-work

Hi @meunierd , we've just released v1.5.0. To handle the other tests, you can now install our sdk-app-collection app which is available here.

shakeelmohamed avatar Oct 02 '15 00:10 shakeelmohamed

This should now be possible to verify via Travis.

Note there are still some intermittent failures, due to the slowness of Splunk running in Docker on Travis. However, you can just re-try the run and it should work just fine.

itay avatar Nov 21 '15 01:11 itay