kv: Add test for server without url key

This commit is contained in:
Kristian Klausen 2017-03-07 15:56:35 +01:00 committed by Emile Vauge
parent 020a8e31ab
commit c864d80270
No known key found for this signature in database
GPG key ID: D808B4C167352E59

View file

@ -304,7 +304,7 @@ func (s *Mock) Get(key string) (*store.KVPair, error) {
return kvPair, nil
}
}
return nil, nil
return nil, store.ErrKeyNotFound
}
func (s *Mock) Delete(key string) error {
@ -410,6 +410,14 @@ func TestKVLoadConfig(t *testing.T) {
Key: "traefik/backends/backend.with.dot.too/servers/server.with.dot/weight",
Value: []byte("0"),
},
{
Key: "traefik/backends/backend.with.dot.too/servers/server.with.dot.without.url",
Value: []byte(""),
},
{
Key: "traefik/backends/backend.with.dot.too/servers/server.with.dot.without.url/weight",
Value: []byte("0"),
},
},
},
}