From 2f2fd2fe4b6bb0a159b4b7a99f26f49fddc922dc Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Sat, 26 Mar 2016 12:17:39 +0100 Subject: [PATCH] Remove cadvisor dependency from tests on Mac --- contrib/mesos/pkg/flagutil/cadvisor.go | 4 ---- contrib/mesos/pkg/flagutil/cadvisor_linux.go | 24 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 contrib/mesos/pkg/flagutil/cadvisor_linux.go diff --git a/contrib/mesos/pkg/flagutil/cadvisor.go b/contrib/mesos/pkg/flagutil/cadvisor.go index ed49bb9d1bb..2290f5e3f86 100644 --- a/contrib/mesos/pkg/flagutil/cadvisor.go +++ b/contrib/mesos/pkg/flagutil/cadvisor.go @@ -19,10 +19,6 @@ package flagutil import ( "flag" - // TODO(jdef) kill this once cadvisor flags are no longer configured by - // global variables. Importing it this way guarantees that the global flag - // variables are initialized. - _ "github.com/google/cadvisor/manager" // kubelet attempts to customize default values for some cadvisor flags, so // make sure that we pick these up. _ "k8s.io/kubernetes/pkg/kubelet/cadvisor" diff --git a/contrib/mesos/pkg/flagutil/cadvisor_linux.go b/contrib/mesos/pkg/flagutil/cadvisor_linux.go new file mode 100644 index 00000000000..69b27852847 --- /dev/null +++ b/contrib/mesos/pkg/flagutil/cadvisor_linux.go @@ -0,0 +1,24 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flagutil + +import ( + // TODO(jdef) kill this once cadvisor flags are no longer configured by + // global variables. Importing it this way guarantees that the global flag + // variables are initialized. + _ "github.com/google/cadvisor/manager" +)