Exemple #1
0
func getJobClient(t *testing.T, c *simple.Client, ns, resourceGroup string) JobInterface {
	switch resourceGroup {
	case batch.GroupName:
		return c.Setup(t).Batch().Jobs(ns)
	case extensions.GroupName:
		return c.Setup(t).Extensions().Jobs(ns)
	default:
		t.Fatalf("Unknown group %v", resourceGroup)
	}
	return nil
}
func getHPAClient(t *testing.T, c *simple.Client, ns, resourceGroup string) HorizontalPodAutoscalerInterface {
	switch resourceGroup {
	case autoscaling.GroupName:
		return c.Setup(t).Autoscaling().HorizontalPodAutoscalers(ns)
	case extensions.GroupName:
		return c.Setup(t).Extensions().HorizontalPodAutoscalers(ns)
	default:
		t.Fatalf("Unknown group %v", resourceGroup)
	}
	return nil
}