Skip to content

Commit 27817ed

Browse files
authored
Merge pull request #1175 from jichenjc/bug/1174
Fix flaky UT on gate
2 parents d8cb1d2 + 280db17 commit 27817ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cloud/services/networking/service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package networking
1818

1919
import (
2020
"fmt"
21+
"sort"
2122

2223
"github.com/go-logr/logr"
2324
"github.com/gophercloud/gophercloud"
@@ -100,6 +101,9 @@ func (s *Service) replaceAllAttributesTags(eventObject runtime.Object, resourceT
100101
uniqueTags = append(uniqueTags, k)
101102
}
102103

104+
// Sort the tags so that we always get fixed order of tags to make UT easier
105+
sort.Strings(uniqueTags)
106+
103107
_, err := s.client.ReplaceAllAttributesTags(resourceType, resourceID, attributestags.ReplaceAllOpts{
104108
Tags: uniqueTags,
105109
})

0 commit comments

Comments
 (0)