@ -35,16 +35,16 @@ func TestRegistryGenerateLocalRegistryHostingConfigMapYAML(t *testing.T) {
var err error
var err error
expectedYAMLString := ` apiVersion : v1
expectedYAMLString := ` apiVersion : v1
kind : ConfigMap
metadata :
name : local - registry - hosting
namespace : kube - public
data :
data :
localRegistryHosting . v1 : |
localRegistryHosting . v1 : |
help : https : //k3d.io/usage/guides/registries/#using-a-local-registry
host : test - host : 5432
host : test - host : 5432
hostFromClusterNetwork : test - host : 1234
hostFromClusterNetwork : test - host : 1234
hostFromContainerRuntime : test - host : 1234
hostFromContainerRuntime : test - host : 1234
help : https : //k3d.io/usage/guides/registries/#using-a-local-registry
kind : ConfigMap
metadata :
name : local - registry - hosting
namespace : kube - public
`
`
reg := & k3d . Registry {
reg := & k3d . Registry {
@ -62,7 +62,7 @@ data:
}
}
if ! ( strings . TrimSpace ( string ( cm ) ) == strings . TrimSpace ( expectedYAMLString ) ) {
if ! ( strings . TrimSpace ( string ( cm ) ) == strings . TrimSpace ( expectedYAMLString ) ) {
t . Errorf ( "Computed configmap\n-> Actual: %s\n does not match expected YAML\n-> Expected: %s" , strings . TrimSpace ( string ( cm ) ) , strings . TrimSpace ( expectedYAMLString ) )
t . Errorf ( "Computed configmap\n-> Actual:\n%s\n does not match expected YAML\n-> Expected:\n %s" , strings . TrimSpace ( string ( cm ) ) , strings . TrimSpace ( expectedYAMLString ) )
}
}
}
}