Skip to content

Commit 837a3dc

Browse files
committed
tests: Fix trivial sorting issue
We've seen an ordering issue pop up occasionally in the CI. Resolve it. Change-Id: I4dd10268b673c260ac0894fac92cd8bea9e626f4 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent a79cb60 commit 837a3dc

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

openstackclient/identity/v3/tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def update_tags_in_args(parsed_args, obj, args):
129129
args['tags'] = []
130130
obj.tags = []
131131
if parsed_args.remove_tag:
132-
args['tags'] = list(set(obj.tags) - set(parsed_args.remove_tag))
132+
args['tags'] = sorted(set(obj.tags) - set(parsed_args.remove_tag))
133133
return
134134
if parsed_args.tags:
135-
args['tags'] = list(set(obj.tags).union(set(parsed_args.tags)))
135+
args['tags'] = sorted(set(obj.tags).union(set(parsed_args.tags)))

openstackclient/tests/unit/identity/v3/test_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ def test_project_set_tags(self):
11301130
# Set expected values. new tag is added to original tags for update.
11311131
kwargs = {
11321132
'name': 'qwerty',
1133-
'tags': list(set(['tag1', 'tag2', 'tag3', 'foo'])),
1133+
'tags': sorted(set(['tag1', 'tag2', 'tag3', 'foo'])),
11341134
}
11351135
# ProjectManager.update(project, name=, domain=, description=,
11361136
# enabled=, **kwargs)

0 commit comments

Comments
 (0)