mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 01:08:47 +02:00
fix(docker): wildcard properties not working with FQDN aliases
This commit is contained in:
@@ -28,6 +28,20 @@ func TestExpandWildcard(t *testing.T) {
|
||||
}, labels)
|
||||
}
|
||||
|
||||
func TestExpandWildcardWithFQDNAliases(t *testing.T) {
|
||||
labels := map[string]string{
|
||||
"proxy.c.host": "localhost",
|
||||
"proxy.*.port": "5555",
|
||||
}
|
||||
docker.ExpandWildcard(labels, "a.example.com", "b.example.com")
|
||||
require.Equal(t, map[string]string{
|
||||
"proxy.#1.port": "5555",
|
||||
"proxy.#2.port": "5555",
|
||||
"proxy.c.host": "localhost",
|
||||
"proxy.c.port": "5555",
|
||||
}, labels)
|
||||
}
|
||||
|
||||
func TestExpandWildcardYAML(t *testing.T) {
|
||||
yaml := `
|
||||
host: localhost
|
||||
|
||||
Reference in New Issue
Block a user