bugfix for port forward custom containers not showing #1844 (#1877)

* bugfix for port forward costum containers not showing
#1844

* Adjust the port forward test key structure

Co-authored-by: Eugene <eugene.berger@dell.com>
mine
Eugene Berger 2022-11-29 17:54:51 +02:00 committed by GitHub
parent 530d067110
commit b9a9fb118d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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{