From 213a1828929e9649a67462babefe3edf004d52a3 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 18 Jul 2018 11:58:11 -0400 Subject: [PATCH] Fix test failure when executed using build/run.sh The container used by build/run.sh doesn't necessarily have an entry in /etc/passwd for the host user's uid, and this missing data causes `whoami` to fail. Switch `whoami` to `id -un` to fall back to the uid if the /etc/passwd entry is missing. Signed-off-by: Andy Goldstein --- cluster/gce/gci/apiserver_manifest_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/gci/apiserver_manifest_test.go b/cluster/gce/gci/apiserver_manifest_test.go index 5b2d570573d..299598aed27 100644 --- a/cluster/gce/gci/apiserver_manifest_test.go +++ b/cluster/gce/gci/apiserver_manifest_test.go @@ -51,7 +51,7 @@ readonly DOCKER_REGISTRY="k8s.gcr.io" readonly ENABLE_LEGACY_ABAC=false readonly ETC_MANIFESTS=${KUBE_HOME}/etc/kubernetes/manifests readonly KUBE_API_SERVER_DOCKER_TAG=v1.11.0-alpha.0.1808_3c7452dc11645d-dirty -readonly LOG_OWNER_USER=$(whoami) +readonly LOG_OWNER_USER=$(id -un) readonly LOG_OWNER_GROUP=$(id -gn) ENCRYPTION_PROVIDER_CONFIG={{.EncryptionProviderConfig}} ENCRYPTION_PROVIDER_CONFIG_PATH={{.EncryptionProviderConfigPath}}