mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-13 20:31:12 +00:00
test_autopkgtest: Strip submit-time
Testsuite regression from 4c27eadffa01bc1c084e947a7fa1e8a7509d1653. submit-time is the time the request was submitted to amqp. For tests it's the time the testcase was run. Many of our testcases test the exact parameters that were passed to amqp, so they now fail because submit-time is in there but it's not being checked for. It would be possible to either verify the submit-time too, or switch to fuzzy matching - but it's actually not very valuable to test submit-time, since it is only for human readers of autopkgtest-cloud log files or autopkgtest.ubuntu.com/running. Instead strip the field from the amqp parameters before any tests see them.
This commit is contained in:
parent
d592ee61ae
commit
177c7a69f7
@ -171,7 +171,14 @@ class T(TestBase):
|
||||
try:
|
||||
with open(self.fake_amqp) as f:
|
||||
for line in f:
|
||||
self.amqp_requests.add(line.strip())
|
||||
# debci-series-amd64:darkgreen {"triggers": ["darkgreen/2"], "submit-time": "2020-01-16 09:47:12"}
|
||||
# strip the submit time from the requests we're testing; it
|
||||
# is only for info for people reading the queue
|
||||
(queuepkg, data) = line.split(' ', 1)
|
||||
data_json = json.loads(data)
|
||||
del data_json["submit-time"]
|
||||
self.amqp_requests.add("{} {}".format(queuepkg,
|
||||
json.dumps(data_json)))
|
||||
os.unlink(self.fake_amqp)
|
||||
except IOError:
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user