Merge ~twom/launchpad:stats-fix-env-tests into launchpad:master

Proposed by Tom Wardill
Status: Merged
Approved by: Tom Wardill
Approved revision: eabcb37e592e7a5773f5b71383571924159c6e7b
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~twom/launchpad:stats-fix-env-tests
Merge into: launchpad:master
Diff against target: 51 lines (+7/-4)
3 files modified
lib/lp/oci/tests/test_ocirecipebuildbehaviour.py (+2/-1)
lib/lp/snappy/tests/test_snapbuildbehaviour.py (+1/-1)
lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py (+4/-2)
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
Colin Watson (community) Approve
Review via email: mp+392944@code.launchpad.net

Commit message

[testfix] fix behaviour stats tests for env parameter

Description of the change

Missed these tests in the original work as they're not labelled 'stats' or similar.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve
Revision history for this message
Ioana Lasc (ilasc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
2index 2297d6e..e6706a8 100644
3--- a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
4+++ b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
5@@ -486,7 +486,8 @@ class TestAsyncOCIRecipeBuildBehaviour(
6 self.assertEqual(1, self.stats_client.incr.call_count)
7 self.assertEqual(
8 self.stats_client.incr.call_args_list[0][0],
9- ('build.count,job_type=OCIRECIPEBUILD,builder_name={}'.format(
10+ ('build.count,job_type=OCIRECIPEBUILD,'
11+ 'builder_name={},env=test'.format(
12 builder.name),))
13
14 @defer.inlineCallbacks
15diff --git a/lib/lp/snappy/tests/test_snapbuildbehaviour.py b/lib/lp/snappy/tests/test_snapbuildbehaviour.py
16index ca4debb..0ffcf88 100644
17--- a/lib/lp/snappy/tests/test_snapbuildbehaviour.py
18+++ b/lib/lp/snappy/tests/test_snapbuildbehaviour.py
19@@ -784,7 +784,7 @@ class TestAsyncSnapBuildBehaviour(StatsMixin, TestSnapBuildBehaviourBase):
20 self.assertEqual(1, self.stats_client.incr.call_count)
21 self.assertEqual(
22 self.stats_client.incr.call_args_list[0][0],
23- ('build.count,job_type=SNAPBUILD,builder_name={}'.format(
24+ ('build.count,job_type=SNAPBUILD,builder_name={},env=test'.format(
25 builder.name),))
26
27 @defer.inlineCallbacks
28diff --git a/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py b/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
29index e773d17..deea061 100644
30--- a/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
31+++ b/lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py
32@@ -187,7 +187,8 @@ class TestBinaryBuildPackageBehaviour(StatsMixin, TestCaseWithFactory):
33 self.assertEqual(1, self.stats_client.incr.call_count)
34 self.assertEqual(
35 self.stats_client.incr.call_args_list[0][0],
36- ('build.count,job_type=PACKAGEBUILD,builder_name={}'.format(
37+ ('build.count,job_type=PACKAGEBUILD,'
38+ 'builder_name={},env=test'.format(
39 builder.name),))
40
41 @defer.inlineCallbacks
42@@ -243,7 +244,8 @@ class TestBinaryBuildPackageBehaviour(StatsMixin, TestCaseWithFactory):
43 self.assertEqual(1, self.stats_client.incr.call_count)
44 self.assertEqual(
45 self.stats_client.incr.call_args_list[0][0],
46- ('build.count,job_type=PACKAGEBUILD,builder_name={}'.format(
47+ ('build.count,job_type=PACKAGEBUILD,'
48+ 'builder_name={},env=test'.format(
49 builder.name),))
50
51 @defer.inlineCallbacks

Subscribers

People subscribed via source and target branches

to status/vote changes: