From 9d45f5b929b64cbdaeeb8b0c6ead3b53dd280aff Mon Sep 17 00:00:00 2001 From: Kris Date: Fri, 11 Sep 2015 10:06:56 -0700 Subject: [PATCH] Pick a sane default for ETCD_PREFIX --- pkg/tools/etcdtest/etcdtest.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/tools/etcdtest/etcdtest.go b/pkg/tools/etcdtest/etcdtest.go index 31a5f9f63eb..5ba3643da24 100644 --- a/pkg/tools/etcdtest/etcdtest.go +++ b/pkg/tools/etcdtest/etcdtest.go @@ -23,7 +23,11 @@ import ( // Returns the prefix set via the ETCD_PREFIX environment variable (if any). func PathPrefix() string { - return path.Join("/", os.Getenv("ETCD_PREFIX")) + pref := os.Getenv("ETCD_PREFIX") + if pref == "" { + pref = "registry" + } + return path.Join("/", pref) } // Adds the ETCD_PREFIX to the provided key