Skip to content

Commit

Permalink
Merge pull request #70282 from justinsb/better_unsupported_provider_m…
Browse files Browse the repository at this point in the history
…essages

Disambiguate "unsupported provider" messages
  • Loading branch information
k8s-ci-robot committed Oct 27, 2018
2 parents 481fa19 + ff8a0e0 commit 8616687
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/e2e/framework/util.go
Expand Up @@ -3895,7 +3895,7 @@ func ParseKVLines(output, key string) string {
func RestartKubeProxy(host string) error {
// TODO: Make it work for all providers.
if !ProviderIs("gce", "gke", "aws") {
return fmt.Errorf("unsupported provider: %s", TestContext.Provider)
return fmt.Errorf("unsupported provider for RestartKubeProxy: %s", TestContext.Provider)
}
// kubelet will restart the kube-proxy since it's running in a static pod
Logf("Killing kube-proxy on node %v", host)
Expand Down Expand Up @@ -3932,7 +3932,7 @@ func RestartKubelet(host string) error {
// TODO: Make it work for all providers and distros.
supportedProviders := []string{"gce", "aws", "vsphere"}
if !ProviderIs(supportedProviders...) {
return fmt.Errorf("unsupported provider: %s, supported providers are: %v", TestContext.Provider, supportedProviders)
return fmt.Errorf("unsupported provider for RestartKubelet: %s, supported providers are: %v", TestContext.Provider, supportedProviders)
}
if ProviderIs("gce") && !NodeOSDistroIs("debian", "gci") {
return fmt.Errorf("unsupported node OS distro: %s", TestContext.NodeOSDistro)
Expand Down Expand Up @@ -3988,7 +3988,7 @@ func WaitForKubeletUp(host string) error {
func RestartApiserver(cs clientset.Interface) error {
// TODO: Make it work for all providers.
if !ProviderIs("gce", "gke", "aws") {
return fmt.Errorf("unsupported provider: %s", TestContext.Provider)
return fmt.Errorf("unsupported provider for RestartApiserver: %s", TestContext.Provider)
}
if ProviderIs("gce", "aws") {
initialRestartCount, err := getApiserverRestartCount(cs)
Expand All @@ -4011,7 +4011,7 @@ func RestartApiserver(cs clientset.Interface) error {

func sshRestartMaster() error {
if !ProviderIs("gce", "aws") {
return fmt.Errorf("unsupported provider: %s", TestContext.Provider)
return fmt.Errorf("unsupported provider for sshRestartMaster: %s", TestContext.Provider)
}
var command string
if ProviderIs("gce") {
Expand Down Expand Up @@ -4077,7 +4077,7 @@ func getApiserverRestartCount(c clientset.Interface) (int32, error) {
func RestartControllerManager() error {
// TODO: Make it work for all providers and distros.
if !ProviderIs("gce", "aws") {
return fmt.Errorf("unsupported provider: %s", TestContext.Provider)
return fmt.Errorf("unsupported provider for RestartControllerManager: %s", TestContext.Provider)
}
if ProviderIs("gce") && !MasterOSDistroIs("gci") {
return fmt.Errorf("unsupported master OS distro: %s", TestContext.MasterOSDistro)
Expand Down

0 comments on commit 8616687

Please sign in to comment.