Skip to content

Commit b809148

Browse files
author
Frederick Ross
committed
Made index.upload tests use app collection (so it will work on with remote plunked).
1 parent 64a883e commit b809148

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/test_index.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,13 @@ def test_submit_via_attached_socket(self):
108108
self.assertEventuallyEqual(eventCount+1, self.totalEventCount)
109109

110110
def test_upload(self):
111-
# The following test must run on machine where splunkd runs,
112-
# otherwise a failure is expected
111+
self.installAppFromCollection("file_to_upload")
112+
113113
eventCount = int(self.index['totalEventCount'])
114-
testpath = path.dirname(path.abspath(__file__))
115-
self.index.upload(path.join(testpath, "testfile.txt"))
116-
self.assertEventuallyEqual(eventCount+1, self.totalEventCount)
114+
115+
path = self.pathInApp("file_to_upload", ["log.txt"])
116+
self.index.upload(path)
117+
self.assertEventuallyEqual(eventCount+4, self.totalEventCount)
117118

118119
if __name__ == "__main__":
119120
testlib.main()

0 commit comments

Comments
 (0)