Skip to content

Commit

Permalink
Correct regexp in test
Browse files Browse the repository at this point in the history
The second group is optional.

Examples:

label_in:indeed
label_quickly:wall|label_market:hear
  • Loading branch information
samdoran committed Sep 14, 2023
1 parent 804de22 commit 037b608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_ocp_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def test_gen_openshift_labels(self):
"""Test that gen_openshift_labels creates well-formatted labels."""
generator = OCPGenerator(self.two_hours_ago, self.now, {})
out_labels = generator._gen_openshift_labels()
matcher = r"(\w+:\w+)(\|(\w+:\w+))+"
matcher = r"(\w+:\w+)((\|(\w+:\w+))+)?"
self.assertRegex(out_labels, matcher)

def test_gen_pods_with_namespaces(self):
Expand Down

0 comments on commit 037b608

Please sign in to comment.