mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
e2e: replace quoted namespace in templates too
Some templates are now generated with the API, and these include namespaces as "quotes" values. Namespace replacing in the templates need to replace both the unquoted and quoted strings. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
32de26828f
commit
a469a66f9d
@ -94,5 +94,9 @@ func replaceNamespaceInTemplate(filePath string) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return strings.ReplaceAll(string(read), "namespace: default", fmt.Sprintf("namespace: %s", cephCSINamespace)), nil
|
||||
// template can contain "default" as namespace, with or without ".
|
||||
templ := strings.ReplaceAll(string(read), "namespace: default", fmt.Sprintf("namespace: %s", cephCSINamespace))
|
||||
templ = strings.ReplaceAll(templ, "namespace: \"default\"", fmt.Sprintf("namespace: %s", cephCSINamespace))
|
||||
|
||||
return templ, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user