Skip to content

Commit

Permalink
Bug 1325069 - Sort status tags according to semver
Browse files Browse the repository at this point in the history
  • Loading branch information
soltysh committed Jul 29, 2016
1 parent 1b04cb2 commit 8fa4694
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/image/api/v1/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func Convert_api_TagEventListArray_to_v1_NamedTagEventListArray(in *map[string]n
for key := range *in {
allKeys = append(allKeys, key)
}
sort.Strings(allKeys)
newer.PrioritizeTags(allKeys)

for _, key := range allKeys {
newTagEventList := (*in)[key]
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ os::test::junit::declare_suite_end
os::test::junit::declare_suite_start "cmd/images/delete-istag"
# test deleting a tag using oc delete
os::cmd::expect_success_and_text "oc get is perl --template '{{(index .spec.tags 0).name}}'" '5.16'
os::cmd::expect_success_and_text "oc get is perl --template '{{(index .status.tags 0).tag}}'" '5.16'
os::cmd::expect_success_and_text "oc get is perl --template '{{(index .status.tags 0).tag}}'" 'latest'
os::cmd::expect_success 'oc delete istag/perl:5.16'
os::cmd::expect_success_and_not_text 'oc get is/perl --template={{.spec.tags}}' 'version:5.16'
os::cmd::expect_success_and_not_text 'oc get is/perl --template={{.status.tags}}' 'version:5.16'
Expand All @@ -251,4 +251,4 @@ os::cmd::expect_success 'oc delete all --all'
echo "delete istag: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
os::test::junit::declare_suite_end

0 comments on commit 8fa4694

Please sign in to comment.