Don't import pod util package from k/k

These are all simple changes that will not change w/o breaking API
changes upstream anyway.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2021-05-04 23:20:06 +00:00
parent e1486ade00
commit 405d5d63b1
4 changed files with 34 additions and 26 deletions

View File

@@ -2,24 +2,13 @@ package expansion
import (
"testing"
api "k8s.io/kubernetes/pkg/apis/core"
)
func TestMapReference(t *testing.T) {
envs := []api.EnvVar{
{
Name: "FOO",
Value: "bar",
},
{
Name: "ZOO",
Value: "$(FOO)-1",
},
{
Name: "BLU",
Value: "$(ZOO)-2",
},
envs := map[string]string{
"FOO": "bar",
"ZOO": "$(FOO)-1",
"BLU": "$(ZOO)-2",
}
declaredEnv := map[string]string{
@@ -32,8 +21,8 @@ func TestMapReference(t *testing.T) {
mapping := MappingFuncFor(declaredEnv, serviceEnv)
for _, env := range envs {
declaredEnv[env.Name] = Expand(env.Value, mapping)
for k, v := range envs {
declaredEnv[k] = Expand(v, mapping)
}
expectedEnv := map[string]string{