mirror of https://github.com/status-im/consul.git
NET 6442 - Add tenancy to explicit destinations controller (#19644)
Add tenancy to explicit destinations controller
This commit is contained in:
parent
bc26fbcf2c
commit
fbc2a58733
File diff suppressed because it is too large
Load Diff
|
@ -4,6 +4,7 @@
|
|||
package resourcetest
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
|
@ -64,3 +65,15 @@ func DefaultTenancyForType(t *testing.T, reg resource.Registration) *pbresource.
|
|||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func AppendTenancyInfo(name string, tenancy *pbresource.Tenancy) string {
|
||||
return fmt.Sprintf("%s_%s_Namespace_%s_Partition", name, tenancy.Namespace, tenancy.Partition)
|
||||
}
|
||||
|
||||
func RunWithTenancies(testFunc func(tenancy *pbresource.Tenancy), t *testing.T) {
|
||||
for _, tenancy := range TestTenancies() {
|
||||
t.Run(AppendTenancyInfo(t.Name(), tenancy), func(t *testing.T) {
|
||||
testFunc(tenancy)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue