Fix log-generator-user-by-row test

The log_generator_user_by_row tests fail sometimes as there may
be data written into the user log while the test is ongoing.
This changes the state from 'Published' to 'Partial' and the
test fails.

The test has been changed to also accept 'Partial' as a valid state.

Change-Id: Iab530fe503336c83e9b948c2c008d371a8030a1e
Closes-Bug: 1643015
This commit is contained in:
Peter Stachowski 2016-11-18 12:26:04 -05:00
parent fef848fbb2
commit 937620eb3b
1 changed files with 3 additions and 2 deletions

View File

@ -559,9 +559,10 @@ class GuestLogRunner(TestRunner):
self.assert_log_publish(
self.auth_client,
log_name,
expected_status=guest_log.LogStatus.Published.name,
expected_status=[guest_log.LogStatus.Published.name,
guest_log.LogStatus.Partial.name],
expected_published=self._get_last_log_published(log_name),
expected_pending=0)
expected_pending=None)
# Now get the full contents of the log
self.assert_log_generator(self.auth_client, log_name, lines=100000)
log_lines = len(self._get_last_log_contents(log_name).splitlines())