File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 4444 - name : Install tox
4545 run : pip install tox
4646
47- - name : Test Execution
48- run : tox -e py
47+ - name : Debug Test Execution
48+ run : tox -e py39 -- -s tests/searchcommands/test_csc_apps. py
4949 fossa-scan :
5050 uses : splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
5151 secrets : inherit
Original file line number Diff line number Diff line change @@ -327,6 +327,7 @@ def _parse_results(self, stream):
327327 if strip_line .__len__ () == 0 :
328328 continue
329329 parsed_line = json_loads (strip_line )
330+ print (f"JSONResultReader: Parsed line: { parsed_line } " )
330331 if "preview" in parsed_line :
331332 self .is_preview = parsed_line ["preview" ]
332333 if "messages" in parsed_line and parsed_line ["messages" ].__len__ () > 0 :
Original file line number Diff line number Diff line change 1414# License for the specific language governing permissions and limitations
1515# under the License.
1616
17+ import logging
1718import unittest
1819import pytest
1920
21+ import splunklib
2022from tests import testlib
2123from splunklib import results
2224
25+ splunklib .setup_logging (logging .DEBUG )
26+
2327
2428@pytest .mark .smoke
2529class TestCSC (testlib .SDKTestCase ):
@@ -64,13 +68,29 @@ def test_eventing_app(self):
6468 self .assertEqual (state .title , "eventing_app" )
6569
6670 jobs = self .service .jobs
71+
72+ test_index_stream = jobs .oneshot (
73+ 'search index="_internal" | head 10' , output_mode = 'json'
74+ )
75+ test_reader = results .JSONResultsReader (test_index_stream )
76+ test_items = list (test_reader )
77+
78+ print ("DEBUG: Test items from _internal index stream:" )
79+ for item in test_items :
80+ print (item )
81+
6782 stream = jobs .oneshot (
6883 'search index="_internal" | fields status | head 4000 | eventingcsc status=200 | head 10' ,
6984 output_mode = 'json' ,
7085 )
86+
7187 reader = results .JSONResultsReader (stream )
7288 items = list (reader )
7389
90+ print ("DEBUG: Items from eventingcsc command:" )
91+ for item in items :
92+ print (item )
93+
7494 actual_results = [item for item in items if isinstance (item , dict )]
7595 informational_messages = [
7696 item for item in items if isinstance (item , results .Message )
You can’t perform that action at this time.
0 commit comments