Merge ~twom/launchpad:oci-policy-fix-registry-tests into launchpad:master

Proposed by Tom Wardill
Status: Merged
Approved by: Tom Wardill
Approved revision: cb691081a19b5cf991388cfcc01ae479f31e41a9
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~twom/launchpad:oci-policy-fix-registry-tests
Merge into: launchpad:master
Diff against target: 17 lines (+6/-1)
1 file modified
lib/lp/oci/tests/test_ociregistryclient.py (+6/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+397262@code.launchpad.net

Commit message

Fix tests creating valid branch names

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
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_ociregistryclient.py b/lib/lp/oci/tests/test_ociregistryclient.py
2index 60729e1..aa71aa3 100644
3--- a/lib/lp/oci/tests/test_ociregistryclient.py
4+++ b/lib/lp/oci/tests/test_ociregistryclient.py
5@@ -117,7 +117,12 @@ class TestOCIRegistryClient(OCIConfigHelperMixin, SpyProxyCallsMixin,
6 }
7 }]
8 self.config = {"rootfs": {"diff_ids": ["diff_id_1", "diff_id_2"]}}
9- self.build = self.factory.makeOCIRecipeBuild()
10+ # This produces a git ref that does not match the 'valid' OCI branch
11+ # format, so will not get multiple tags. Multiple tags are tested
12+ # explicitly.
13+ [git_ref] = self.factory.makeGitRefs()
14+ recipe = self.factory.makeOCIRecipe(git_ref=git_ref)
15+ self.build = self.factory.makeOCIRecipeBuild(recipe=recipe)
16 self.push_rule = self.factory.makeOCIPushRule(recipe=self.build.recipe)
17 self.client = OCIRegistryClient()
18

Subscribers

People subscribed via source and target branches

to status/vote changes: