Allow unicode in service paths

- according to discussion in #1013 all unicode characters are
valid label values - this commit allows the original path to be
retained.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (VMware)
2019-01-24 09:06:18 +00:00
committed by Alex Ellis
parent 67c9a71686
commit a26d350376
2 changed files with 29 additions and 9 deletions

View File

@ -0,0 +1,23 @@
package handlers
import "testing"
func Test_urlToLabel_normalizeTrailing(t *testing.T) {
have := "/system/functions/"
want := "/system/functions"
got := urlToLabel(have)
if got != want {
t.Errorf("want %s, got %s", want, got)
}
}
func Test_urlToLabel_retainRoot(t *testing.T) {
have := "/"
want := have
got := urlToLabel(have)
if got != want {
t.Errorf("want %s, got %s", want, got)
}
}