diff --git a/internal/dao/port_forward.go b/internal/dao/port_forward.go index 5afbaa67..c4f05837 100644 --- a/internal/dao/port_forward.go +++ b/internal/dao/port_forward.go @@ -75,7 +75,7 @@ var podNameRX = regexp.MustCompile(`\A(.+)\-(\w{10})\-(\w{5})\z`) // PodToKey converts a pod path to a generic bench config key. func PodToKey(path string) string { - tokens := strings.Split(path, ":") + tokens := strings.Split(path, "|") ns, po := client.Namespaced(tokens[0]) sections := podNameRX.FindStringSubmatch(po) if len(sections) >= 1 { diff --git a/internal/dao/port_forward_test.go b/internal/dao/port_forward_test.go index 691eee7f..d5d757a3 100644 --- a/internal/dao/port_forward_test.go +++ b/internal/dao/port_forward_test.go @@ -14,7 +14,7 @@ func TestBenchForConfig(t *testing.T) { spec config.BenchConfig }{ "no_file": {file: "", key: "", spec: config.DefaultBenchSpec()}, - "spec": {file: "testdata/benchspec.yml", key: "default/nginx-123-456:nginx", spec: config.BenchConfig{ + "spec": {file: "testdata/benchspec.yml", key: "default/nginx-123-456|nginx", spec: config.BenchConfig{ C: 2, N: 3000, HTTP: config.HTTP{