Skip to content

Commit 02995a0

Browse files
author
David Noble
committed
First draft gzipped-records
100% test pass with one false failure, the result of a dictionary ordering issue in `tests.searchcommands.test_internals_v2.TestInternals.TestInternals.test_record_writer_with_recordings`. We may be able to change to an OrderedDict to solve this problem.
1 parent f4d260a commit 02995a0

35 files changed

+18296
-101388
lines changed

splunklib/searchcommands/internals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from urllib import unquote
2525

2626
import csv
27-
import io
27+
import gzip
2828
import os
2929
import re
3030
import sys
@@ -424,7 +424,7 @@ def __str__(self):
424424
class Recorder(object):
425425

426426
def __init__(self, path, f):
427-
self._recording = io.open(path, 'wb')
427+
self._recording = gzip.open(path + '.gz', 'wb')
428428
self._file = f
429429

430430
def __getattr__(self, name):

tests/searchcommands/recordings/scpv1/Splunk-6.3/countmatches.execute.input

Lines changed: 0 additions & 639 deletions
This file was deleted.
Binary file not shown.

tests/searchcommands/recordings/scpv1/Splunk-6.3/countmatches.getinfo.input

Lines changed: 0 additions & 9 deletions
This file was deleted.
Binary file not shown.

tests/searchcommands/recordings/scpv1/Splunk-6.3/generatehello.execute.input

Lines changed: 0 additions & 10 deletions
This file was deleted.
Binary file not shown.

tests/searchcommands/recordings/scpv1/Splunk-6.3/generatehello.getinfo.input

Lines changed: 0 additions & 9 deletions
This file was deleted.
Binary file not shown.

tests/searchcommands/recordings/scpv1/Splunk-6.3/pypygeneratetext.execute.input

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)