mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-11-20 20:41:06 +01:00
Oops, i guess my unit test was flaky in #1068
This commit is contained in:
parent
e94cba604d
commit
fce90b07ec
@ -447,7 +447,13 @@ func buildIPSetRestore(ipset *IPSet) string {
|
||||
ipSetRestore.WriteString(fmt.Sprintf("flush %s\n", tmpSetName))
|
||||
}
|
||||
|
||||
setsToDestroy := make([]string, 0, len(tmpSets))
|
||||
for _, tmpSetName := range tmpSets {
|
||||
setsToDestroy = append(setsToDestroy, tmpSetName)
|
||||
}
|
||||
// need to destroy the sets in a predictable order for unit test!
|
||||
sort.Strings(setsToDestroy)
|
||||
for _, tmpSetName := range setsToDestroy {
|
||||
// finally, destroy the tmp sets.
|
||||
ipSetRestore.WriteString(fmt.Sprintf("destroy %s\n", tmpSetName))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user