Add an option to pass client's QPS/burst to e2e framework

This commit is contained in:
gmarek 2016-02-24 16:24:36 +01:00
parent 38a30490ed
commit 110340c467
68 changed files with 102 additions and 87 deletions

View File

@ -192,7 +192,7 @@ var _ = Describe("Addon update", func() {
var dir string var dir string
var sshClient *ssh.Client var sshClient *ssh.Client
f := NewFramework("addon-update-test") f := NewDefaultFramework("addon-update-test")
BeforeEach(func() { BeforeEach(func() {
// This test requires: // This test requires:

View File

@ -33,7 +33,7 @@ const (
var _ = Describe("Cadvisor", func() { var _ = Describe("Cadvisor", func() {
f := NewFramework("cadvisor") f := NewDefaultFramework("cadvisor")
It("should be healthy on every node.", func() { It("should be healthy on every node.", func() {
CheckCadvisorHealthOnAllNodes(f.Client, 5*time.Minute) CheckCadvisorHealthOnAllNodes(f.Client, 5*time.Minute)

View File

@ -38,7 +38,7 @@ const (
// //
// These tests take ~20 minutes to run each. // These tests take ~20 minutes to run each.
var _ = Describe("Cluster size autoscaling [Feature:ClusterSizeAutoscaling] [Slow]", func() { var _ = Describe("Cluster size autoscaling [Feature:ClusterSizeAutoscaling] [Slow]", func() {
f := NewFramework("autoscaling") f := NewDefaultFramework("autoscaling")
var nodeCount int var nodeCount int
var coresPerNode int var coresPerNode int
var memCapacityMb int var memCapacityMb int

View File

@ -160,7 +160,7 @@ var _ = Describe("Upgrade [Feature:Upgrade]", func() {
Logf("Version for %q is %q", testContext.UpgradeTarget, v) Logf("Version for %q is %q", testContext.UpgradeTarget, v)
}) })
f := NewFramework("cluster-upgrade") f := NewDefaultFramework("cluster-upgrade")
var w *ServiceTestFixture var w *ServiceTestFixture
BeforeEach(func() { BeforeEach(func() {
By("Setting up the service, RC, and pods") By("Setting up the service, RC, and pods")

View File

@ -29,7 +29,7 @@ import (
var _ = Describe("ConfigMap", func() { var _ = Describe("ConfigMap", func() {
f := NewFramework("configmap") f := NewDefaultFramework("configmap")
It("should be consumable from pods in volume [Conformance]", func() { It("should be consumable from pods in volume [Conformance]", func() {
name := "configmap-test-volume-" + string(util.NewUUID()) name := "configmap-test-volume-" + string(util.NewUUID())

View File

@ -36,7 +36,7 @@ const (
) )
var _ = Describe("Probing container", func() { var _ = Describe("Probing container", func() {
framework := NewFramework("container-probe") framework := NewDefaultFramework("container-probe")
var podClient client.PodInterface var podClient client.PodInterface
probe := webserverProbeBuilder{} probe := webserverProbeBuilder{}

View File

@ -185,7 +185,7 @@ func getContainerRestarts(c *client.Client, ns string, labelSelector labels.Sele
var _ = Describe("DaemonRestart [Disruptive]", func() { var _ = Describe("DaemonRestart [Disruptive]", func() {
framework := NewFramework("daemonrestart") framework := NewDefaultFramework("daemonrestart")
rcName := "daemonrestart" + strconv.Itoa(numPods) + "-" + string(util.NewUUID()) rcName := "daemonrestart" + strconv.Itoa(numPods) + "-" + string(util.NewUUID())
labelSelector := labels.Set(map[string]string{"name": rcName}).AsSelector() labelSelector := labels.Set(map[string]string{"name": rcName}).AsSelector()
existingPods := cache.NewStore(cache.MetaNamespaceKeyFunc) existingPods := cache.NewStore(cache.MetaNamespaceKeyFunc)

View File

@ -66,7 +66,7 @@ var _ = Describe("Daemon set", func() {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
}) })
f = NewFramework("daemonsets") f = NewDefaultFramework("daemonsets")
image := "gcr.io/google_containers/serve_hostname:1.1" image := "gcr.io/google_containers/serve_hostname:1.1"
dsName := "daemon-set" dsName := "daemon-set"

View File

@ -37,7 +37,7 @@ var _ = Describe("Kubernetes Dashboard", func() {
serverStartTimeout = 1 * time.Minute serverStartTimeout = 1 * time.Minute
) )
f := NewFramework(uiServiceName) f := NewDefaultFramework(uiServiceName)
It("should check that the kubernetes-dashboard instance is alive", func() { It("should check that the kubernetes-dashboard instance is alive", func() {
By("Checking whether the kubernetes-dashboard service exists.") By("Checking whether the kubernetes-dashboard service exists.")

View File

@ -131,19 +131,15 @@ var _ = Describe("Density", func() {
// Explicitly put here, to delete namespace at the end of the test // Explicitly put here, to delete namespace at the end of the test
// (after measuring latency metrics, etc.).framework := NewFramework("density") // (after measuring latency metrics, etc.).framework := NewFramework("density")
framework := NewFramework("density") options := FrameworkOptions{
clientQPS: 20,
clientBurst: 30,
}
framework := NewFramework("density", options)
framework.NamespaceDeletionTimeout = time.Hour framework.NamespaceDeletionTimeout = time.Hour
BeforeEach(func() { BeforeEach(func() {
// Explicitly create a client with higher QPS limits. c = framework.Client
// However, make those at most comparable to components.
config, err := loadConfig()
Expect(err).NotTo(HaveOccurred())
config.QPS = 20
config.Burst = 30
c, err = loadClientFromConfig(config)
Expect(err).NotTo(HaveOccurred())
ns = framework.Namespace.Name ns = framework.Namespace.Name
nodes := ListSchedulableNodesOrDie(c) nodes := ListSchedulableNodesOrDie(c)
@ -153,7 +149,7 @@ var _ = Describe("Density", func() {
// Terminating a namespace (deleting the remaining objects from it - which // Terminating a namespace (deleting the remaining objects from it - which
// generally means events) can affect the current run. Thus we wait for all // generally means events) can affect the current run. Thus we wait for all
// terminating namespace to be finally deleted before starting this test. // terminating namespace to be finally deleted before starting this test.
err = checkTestingNSDeletedExcept(c, ns) err := checkTestingNSDeletedExcept(c, ns)
expectNoError(err) expectNoError(err)
uuid = string(util.NewUUID()) uuid = string(util.NewUUID())

View File

@ -37,7 +37,7 @@ import (
) )
var _ = Describe("Deployment", func() { var _ = Describe("Deployment", func() {
f := NewFramework("deployment") f := NewDefaultFramework("deployment")
It("deployment should create new pods", func() { It("deployment should create new pods", func() {
testNewDeployment(f) testNewDeployment(f)

View File

@ -197,7 +197,7 @@ func validateDNSResults(f *Framework, pod *api.Pod, fileNames []string) {
} }
var _ = Describe("DNS", func() { var _ = Describe("DNS", func() {
f := NewFramework("dns") f := NewDefaultFramework("dns")
It("should provide DNS for the cluster", func() { It("should provide DNS for the cluster", func() {
// TODO: support DNS on vagrant #3580 // TODO: support DNS on vagrant #3580

View File

@ -25,7 +25,7 @@ import (
) )
var _ = Describe("Docker Containers", func() { var _ = Describe("Docker Containers", func() {
framework := NewFramework("containers") framework := NewDefaultFramework("containers")
var c *client.Client var c *client.Client
var ns string var ns string

View File

@ -26,7 +26,7 @@ import (
) )
var _ = Describe("Downward API", func() { var _ = Describe("Downward API", func() {
framework := NewFramework("downward-api") framework := NewDefaultFramework("downward-api")
It("should provide pod name and namespace as env vars [Conformance]", func() { It("should provide pod name and namespace as env vars [Conformance]", func() {
podName := "downward-api-" + string(util.NewUUID()) podName := "downward-api-" + string(util.NewUUID())

View File

@ -31,7 +31,7 @@ var _ = Describe("Downward API volume", func() {
// How long to wait for a log pod to be displayed // How long to wait for a log pod to be displayed
const podLogTimeout = 45 * time.Second const podLogTimeout = 45 * time.Second
f := NewFramework("downward-api") f := NewDefaultFramework("downward-api")
It("should provide podname only [Conformance]", func() { It("should provide podname only [Conformance]", func() {
podName := "downwardapi-volume-" + string(util.NewUUID()) podName := "downwardapi-volume-" + string(util.NewUUID())
pod := downwardAPIVolumePodForSimpleTest(podName, "/etc/podname") pod := downwardAPIVolumePodForSimpleTest(podName, "/etc/podname")

View File

@ -35,7 +35,7 @@ const (
var _ = Describe("EmptyDir volumes", func() { var _ = Describe("EmptyDir volumes", func() {
f := NewFramework("emptydir") f := NewDefaultFramework("emptydir")
Context("when FSGroup is specified [Feature:FSGroup]", func() { Context("when FSGroup is specified [Feature:FSGroup]", func() {
It("new files should be created with FSGroup ownership when container is root", func() { It("new files should be created with FSGroup ownership when container is root", func() {

View File

@ -29,7 +29,7 @@ import (
// This test will create a pod with a secret volume and gitRepo volume // This test will create a pod with a secret volume and gitRepo volume
// Thus requests a secret, a git server pod, and a git server service // Thus requests a secret, a git server pod, and a git server service
var _ = Describe("EmptyDir wrapper volumes", func() { var _ = Describe("EmptyDir wrapper volumes", func() {
f := NewFramework("secrets") f := NewDefaultFramework("secrets")
It("should becomes running", func() { It("should becomes running", func() {
name := "secret-test-" + string(util.NewUUID()) name := "secret-test-" + string(util.NewUUID())

View File

@ -31,7 +31,7 @@ import (
) )
var _ = Describe("Cluster level logging using Elasticsearch [Feature:Elasticsearch]", func() { var _ = Describe("Cluster level logging using Elasticsearch [Feature:Elasticsearch]", func() {
f := NewFramework("es-logging") f := NewDefaultFramework("es-logging")
BeforeEach(func() { BeforeEach(func() {
// TODO: For now assume we are only testing cluster logging with Elasticsearch // TODO: For now assume we are only testing cluster logging with Elasticsearch

View File

@ -29,7 +29,7 @@ import (
var _ = Describe("Etcd failure [Disruptive]", func() { var _ = Describe("Etcd failure [Disruptive]", func() {
framework := NewFramework("etcd-failure") framework := NewDefaultFramework("etcd-failure")
BeforeEach(func() { BeforeEach(func() {
// This test requires: // This test requires:

View File

@ -32,7 +32,7 @@ import (
) )
var _ = Describe("Events", func() { var _ = Describe("Events", func() {
framework := NewFramework("events") framework := NewDefaultFramework("events")
It("should be sent by kubelets and the scheduler about pods scheduling and running [Conformance]", func() { It("should be sent by kubelets and the scheduler about pods scheduling and running [Conformance]", func() {

View File

@ -42,7 +42,7 @@ except:
print 'err'` print 'err'`
var _ = Describe("ClusterDns [Feature:Example]", func() { var _ = Describe("ClusterDns [Feature:Example]", func() {
framework := NewFramework("cluster-dns") framework := NewDefaultFramework("cluster-dns")
var c *client.Client var c *client.Client
BeforeEach(func() { BeforeEach(func() {

View File

@ -157,7 +157,7 @@ var _ = Describe("Pet Store [Feature:Example]", func() {
// The number of nodes dictates total number of generators/transaction expectations. // The number of nodes dictates total number of generators/transaction expectations.
var nodeCount int var nodeCount int
f := NewFramework("petstore") f := NewDefaultFramework("petstore")
It(fmt.Sprintf("should scale to persist a nominal number ( %v ) of transactions in %v seconds", k8bpsSmokeTestFinalTransactions, k8bpsSmokeTestTimeout), func() { It(fmt.Sprintf("should scale to persist a nominal number ( %v ) of transactions in %v seconds", k8bpsSmokeTestFinalTransactions, k8bpsSmokeTestTimeout), func() {
nodes := ListSchedulableNodesOrDie(f.Client) nodes := ListSchedulableNodesOrDie(f.Client)

View File

@ -37,7 +37,7 @@ const (
) )
var _ = Describe("[Feature:Example]", func() { var _ = Describe("[Feature:Example]", func() {
framework := NewFramework("examples") framework := NewDefaultFramework("examples")
var c *client.Client var c *client.Client
var ns string var ns string
BeforeEach(func() { BeforeEach(func() {

View File

@ -26,7 +26,7 @@ import (
// These tests exercise the Kubernetes expansion syntax $(VAR). // These tests exercise the Kubernetes expansion syntax $(VAR).
// For more information, see: docs/design/expansion.md // For more information, see: docs/design/expansion.md
var _ = Describe("Variable Expansion", func() { var _ = Describe("Variable Expansion", func() {
framework := NewFramework("var-expansion") framework := NewDefaultFramework("var-expansion")
It("should allow composing env vars into new env vars [Conformance]", func() { It("should allow composing env vars into new env vars [Conformance]", func() {
podName := "var-expansion-" + string(util.NewUUID()) podName := "var-expansion-" + string(util.NewUUID())

View File

@ -65,6 +65,9 @@ type Framework struct {
// we install a cleanup action before each test and clear it after. If we // we install a cleanup action before each test and clear it after. If we
// should abort, the AfterSuite hook should run all cleanup actions. // should abort, the AfterSuite hook should run all cleanup actions.
cleanupHandle CleanupActionHandle cleanupHandle CleanupActionHandle
// configuration for framework's client
options FrameworkOptions
} }
type TestDataSummary interface { type TestDataSummary interface {
@ -72,12 +75,26 @@ type TestDataSummary interface {
PrintJSON() string PrintJSON() string
} }
type FrameworkOptions struct {
clientQPS float32
clientBurst int
}
// NewFramework makes a new framework and sets up a BeforeEach/AfterEach for // NewFramework makes a new framework and sets up a BeforeEach/AfterEach for
// you (you can write additional before/after each functions). // you (you can write additional before/after each functions).
func NewFramework(baseName string) *Framework { func NewDefaultFramework(baseName string) *Framework {
options := FrameworkOptions{
clientQPS: 5,
clientBurst: 10,
}
return NewFramework(baseName, options)
}
func NewFramework(baseName string, options FrameworkOptions) *Framework {
f := &Framework{ f := &Framework{
BaseName: baseName, BaseName: baseName,
addonResourceConstraints: make(map[string]resourceConstraint), addonResourceConstraints: make(map[string]resourceConstraint),
options: options,
} }
BeforeEach(f.beforeEach) BeforeEach(f.beforeEach)
@ -93,7 +110,11 @@ func (f *Framework) beforeEach() {
f.cleanupHandle = AddCleanupAction(f.afterEach) f.cleanupHandle = AddCleanupAction(f.afterEach)
By("Creating a kubernetes client") By("Creating a kubernetes client")
c, err := loadClient() config, err := loadConfig()
Expect(err).NotTo(HaveOccurred())
config.QPS = f.options.clientQPS
config.Burst = f.options.clientBurst
c, err := loadClientFromConfig(config)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
f.Client = c f.Client = c

View File

@ -30,7 +30,7 @@ import (
// //
// Slow by design (7 min) // Slow by design (7 min)
var _ = Describe("Garbage collector [Slow]", func() { var _ = Describe("Garbage collector [Slow]", func() {
f := NewFramework("garbage-collector") f := NewDefaultFramework("garbage-collector")
It("should handle the creation of 1000 pods", func() { It("should handle the creation of 1000 pods", func() {
SkipUnlessProviderIs("gce") SkipUnlessProviderIs("gce")

View File

@ -33,7 +33,7 @@ import (
) )
var _ = Describe("Generated release_1_2 clientset", func() { var _ = Describe("Generated release_1_2 clientset", func() {
framework := NewFramework("clientset") framework := NewDefaultFramework("clientset")
It("should create pods, delete pods, watch pods", func() { It("should create pods, delete pods, watch pods", func() {
podClient := framework.Clientset_1_2.Core().Pods(framework.Namespace.Name) podClient := framework.Clientset_1_2.Core().Pods(framework.Namespace.Name)
By("creating the pod") By("creating the pod")

View File

@ -36,7 +36,7 @@ const (
// These tests take ~20 minutes each. // These tests take ~20 minutes each.
var _ = Describe("Horizontal pod autoscaling (scale resource: CPU) [Serial] [Slow]", func() { var _ = Describe("Horizontal pod autoscaling (scale resource: CPU) [Serial] [Slow]", func() {
var rc *ResourceConsumer var rc *ResourceConsumer
f := NewFramework("horizontal-pod-autoscaling") f := NewDefaultFramework("horizontal-pod-autoscaling")
titleUp := "Should scale from 1 pod to 3 pods and from 3 to 5" titleUp := "Should scale from 1 pod to 3 pods and from 3 to 5"
titleDown := "Should scale from 5 pods to 3 pods and from 3 to 1" titleDown := "Should scale from 5 pods to 3 pods and from 3 to 1"

View File

@ -32,7 +32,7 @@ import (
//TODO : Consolidate this code with the code for emptyDir. //TODO : Consolidate this code with the code for emptyDir.
//This will require some smart. //This will require some smart.
var _ = Describe("hostPath", func() { var _ = Describe("hostPath", func() {
framework := NewFramework("hostpath") framework := NewDefaultFramework("hostpath")
var c *client.Client var c *client.Client
var namespace *api.Namespace var namespace *api.Namespace

View File

@ -30,7 +30,7 @@ import (
// //
// Flaky issue #20272 // Flaky issue #20272
var _ = Describe("Initial Resources [Feature:InitialResources] [Flaky]", func() { var _ = Describe("Initial Resources [Feature:InitialResources] [Flaky]", func() {
f := NewFramework("initial-resources") f := NewDefaultFramework("initial-resources")
It("should set initial resources based on historical data", func() { It("should set initial resources based on historical data", func() {
// TODO(piosz): Add cleanup data in InfluxDB that left from previous tests. // TODO(piosz): Add cleanup data in InfluxDB that left from previous tests.

View File

@ -40,7 +40,7 @@ const (
) )
var _ = Describe("Job", func() { var _ = Describe("Job", func() {
f := NewFramework("job") f := NewDefaultFramework("job")
parallelism := 2 parallelism := 2
completions := 4 completions := 4
lotsOfFailures := 5 // more than completions lotsOfFailures := 5 // more than completions

View File

@ -27,7 +27,7 @@ import (
) )
var _ = Describe("Kibana Logging Instances Is Alive", func() { var _ = Describe("Kibana Logging Instances Is Alive", func() {
f := NewFramework("kibana-logging") f := NewDefaultFramework("kibana-logging")
BeforeEach(func() { BeforeEach(func() {
// TODO: For now assume we are only testing cluster logging with Elasticsearch // TODO: For now assume we are only testing cluster logging with Elasticsearch

View File

@ -105,7 +105,7 @@ var (
var _ = Describe("Kubectl client", func() { var _ = Describe("Kubectl client", func() {
defer GinkgoRecover() defer GinkgoRecover()
framework := NewFramework("kubectl") framework := NewDefaultFramework("kubectl")
var c *client.Client var c *client.Client
var ns string var ns string
BeforeEach(func() { BeforeEach(func() {

View File

@ -89,7 +89,7 @@ func waitTillNPodsRunningOnNodes(c *client.Client, nodeNames sets.String, podNam
var _ = Describe("kubelet", func() { var _ = Describe("kubelet", func() {
var numNodes int var numNodes int
var nodeNames sets.String var nodeNames sets.String
framework := NewFramework("kubelet") framework := NewDefaultFramework("kubelet")
var resourceMonitor *resourceMonitor var resourceMonitor *resourceMonitor
BeforeEach(func() { BeforeEach(func() {

View File

@ -41,7 +41,7 @@ type KubeletManagedHostConfig struct {
} }
var _ = Describe("KubeletManagedEtcHosts", func() { var _ = Describe("KubeletManagedEtcHosts", func() {
f := NewFramework("e2e-kubelet-etc-hosts") f := NewDefaultFramework("e2e-kubelet-etc-hosts")
config := &KubeletManagedHostConfig{ config := &KubeletManagedHostConfig{
f: f, f: f,
} }

View File

@ -179,7 +179,7 @@ func verifyCPULimits(expected containersCPUSummary, actual nodesCPUSummary) {
// Slow by design (1 hour) // Slow by design (1 hour)
var _ = Describe("Kubelet [Serial] [Slow]", func() { var _ = Describe("Kubelet [Serial] [Slow]", func() {
var nodeNames sets.String var nodeNames sets.String
framework := NewFramework("kubelet-perf") framework := NewDefaultFramework("kubelet-perf")
var rm *resourceMonitor var rm *resourceMonitor
BeforeEach(func() { BeforeEach(func() {

View File

@ -66,7 +66,7 @@ type KubeProxyTestConfig struct {
} }
var _ = Describe("KubeProxy", func() { var _ = Describe("KubeProxy", func() {
f := NewFramework("e2e-kubeproxy") f := NewDefaultFramework("e2e-kubeproxy")
config := &KubeProxyTestConfig{ config := &KubeProxyTestConfig{
f: f, f: f,
} }

View File

@ -27,7 +27,7 @@ import (
) )
var _ = Describe("LimitRange", func() { var _ = Describe("LimitRange", func() {
f := NewFramework("limitrange") f := NewDefaultFramework("limitrange")
It("should create a LimitRange with defaults and ensure pod has those defaults applied.", func() { It("should create a LimitRange with defaults and ensure pod has those defaults applied.", func() {
By("Creating a LimitRange") By("Creating a LimitRange")

View File

@ -64,17 +64,15 @@ var _ = Describe("Load capacity", func() {
// Explicitly put here, to delete namespace at the end of the test // Explicitly put here, to delete namespace at the end of the test
// (after measuring latency metrics, etc.). // (after measuring latency metrics, etc.).
framework := NewFramework("load") options := FrameworkOptions{
clientQPS: 50,
clientBurst: 100,
}
framework := NewFramework("load", options)
framework.NamespaceDeletionTimeout = time.Hour framework.NamespaceDeletionTimeout = time.Hour
BeforeEach(func() { BeforeEach(func() {
// Explicitly create a client with higher QPS limits. c = framework.Client
config, err := loadConfig()
Expect(err).NotTo(HaveOccurred())
config.QPS = 50
config.Burst = 100
c, err = loadClientFromConfig(config)
Expect(err).NotTo(HaveOccurred())
ns = framework.Namespace.Name ns = framework.Namespace.Name
nodes := ListSchedulableNodesOrDie(c) nodes := ListSchedulableNodesOrDie(c)
@ -84,7 +82,7 @@ var _ = Describe("Load capacity", func() {
// Terminating a namespace (deleting the remaining objects from it - which // Terminating a namespace (deleting the remaining objects from it - which
// generally means events) can affect the current run. Thus we wait for all // generally means events) can affect the current run. Thus we wait for all
// terminating namespace to be finally deleted before starting this test. // terminating namespace to be finally deleted before starting this test.
err = checkTestingNSDeletedExcept(c, ns) err := checkTestingNSDeletedExcept(c, ns)
expectNoError(err) expectNoError(err)
expectNoError(resetMetrics(c)) expectNoError(resetMetrics(c))

View File

@ -30,7 +30,7 @@ import (
) )
var _ = Describe("Mesos", func() { var _ = Describe("Mesos", func() {
framework := NewFramework("pods") framework := NewDefaultFramework("pods")
var c *client.Client var c *client.Client
var ns string var ns string

View File

@ -78,7 +78,7 @@ func checkMetrics(response metrics.Metrics, assumedMetrics map[string][]string)
} }
var _ = Describe("MetricsGrabber", func() { var _ = Describe("MetricsGrabber", func() {
framework := NewFramework("metrics-grabber") framework := NewDefaultFramework("metrics-grabber")
var c *client.Client var c *client.Client
var grabber *metrics.MetricsGrabber var grabber *metrics.MetricsGrabber
BeforeEach(func() { BeforeEach(func() {

View File

@ -32,7 +32,7 @@ import (
) )
var _ = Describe("Monitoring", func() { var _ = Describe("Monitoring", func() {
f := NewFramework("monitoring") f := NewDefaultFramework("monitoring")
BeforeEach(func() { BeforeEach(func() {
SkipUnlessProviderIs("gce") SkipUnlessProviderIs("gce")

View File

@ -104,7 +104,7 @@ func extinguish(f *Framework, totalNS int, maxAllowedAfterDel int, maxSeconds in
// rate of approximately 1 per second. // rate of approximately 1 per second.
var _ = Describe("Namespaces [Serial]", func() { var _ = Describe("Namespaces [Serial]", func() {
f := NewFramework("namespaces") f := NewDefaultFramework("namespaces")
It("should delete fast enough (90 percent of 100 namespaces in 150 seconds)", It("should delete fast enough (90 percent of 100 namespaces in 150 seconds)",
func() { extinguish(f, 100, 10, 150) }) func() { extinguish(f, 100, 10, 150) })

View File

@ -32,7 +32,7 @@ import (
) )
var _ = Describe("Networking", func() { var _ = Describe("Networking", func() {
f := NewFramework("nettest") f := NewDefaultFramework("nettest")
var svcname = "nettest" var svcname = "nettest"

View File

@ -67,7 +67,7 @@ const (
var _ = Describe("NodeOutOfDisk [Serial] [Flaky]", func() { var _ = Describe("NodeOutOfDisk [Serial] [Flaky]", func() {
var c *client.Client var c *client.Client
var unfilledNodeName, recoveredNodeName string var unfilledNodeName, recoveredNodeName string
framework := NewFramework("node-outofdisk") framework := NewDefaultFramework("node-outofdisk")
BeforeEach(func() { BeforeEach(func() {
c = framework.Client c = framework.Client

View File

@ -47,7 +47,7 @@ var _ = Describe("Pod Disks", func() {
host0Name string host0Name string
host1Name string host1Name string
) )
framework := NewFramework("pod-disks") framework := NewDefaultFramework("pod-disks")
BeforeEach(func() { BeforeEach(func() {
SkipUnlessNodeCountIsAtLeast(2) SkipUnlessNodeCountIsAtLeast(2)

View File

@ -31,7 +31,7 @@ import (
// This test needs privileged containers, which are disabled by default. Run // This test needs privileged containers, which are disabled by default. Run
// the test with "go run hack/e2e.go ... --ginkgo.focus=[Feature:Volumes]" // the test with "go run hack/e2e.go ... --ginkgo.focus=[Feature:Volumes]"
var _ = Describe("PersistentVolumes [Feature:Volumes]", func() { var _ = Describe("PersistentVolumes [Feature:Volumes]", func() {
framework := NewFramework("pv") framework := NewDefaultFramework("pv")
var c *client.Client var c *client.Client
var ns string var ns string

View File

@ -207,7 +207,7 @@ func getRestartDelay(c *client.Client, pod *api.Pod, ns string, name string, con
} }
var _ = Describe("Pods", func() { var _ = Describe("Pods", func() {
framework := NewFramework("pods") framework := NewDefaultFramework("pods")
It("should get a host IP [Conformance]", func() { It("should get a host IP [Conformance]", func() {
name := "pod-hostip-" + string(util.NewUUID()) name := "pod-hostip-" + string(util.NewUUID())

View File

@ -111,7 +111,7 @@ func runPortForward(ns, podName string, port int) (*exec.Cmd, int) {
} }
var _ = Describe("Port forwarding", func() { var _ = Describe("Port forwarding", func() {
framework := NewFramework("port-forwarding") framework := NewDefaultFramework("port-forwarding")
Describe("With a server that expects a client request", func() { Describe("With a server that expects a client request", func() {
It("should support a client that connects, sends no data, and disconnects [Conformance]", func() { It("should support a client that connects, sends no data, and disconnects [Conformance]", func() {

View File

@ -159,7 +159,7 @@ func testPreStop(c *client.Client, ns string) {
} }
var _ = Describe("PreStop", func() { var _ = Describe("PreStop", func() {
f := NewFramework("prestop") f := NewDefaultFramework("prestop")
It("should call prestop when killing a pod [Conformance]", func() { It("should call prestop when killing a pod [Conformance]", func() {
testPreStop(f.Client, f.Namespace.Name) testPreStop(f.Client, f.Namespace.Name)

View File

@ -48,7 +48,7 @@ type PrivilegedPodTestConfig struct {
} }
var _ = Describe("PrivilegedPod", func() { var _ = Describe("PrivilegedPod", func() {
f := NewFramework("e2e-privilegedpod") f := NewDefaultFramework("e2e-privilegedpod")
config := &PrivilegedPodTestConfig{ config := &PrivilegedPodTestConfig{
f: f, f: f,
} }

View File

@ -48,7 +48,7 @@ const (
) )
func proxyContext(version string) { func proxyContext(version string) {
f := NewFramework("proxy") f := NewDefaultFramework("proxy")
prefix := "/api/" + version prefix := "/api/" + version
// Port here has to be kept in sync with default kubelet port. // Port here has to be kept in sync with default kubelet port.

View File

@ -30,7 +30,7 @@ import (
) )
var _ = Describe("ReplicationController", func() { var _ = Describe("ReplicationController", func() {
framework := NewFramework("replication-controller") framework := NewDefaultFramework("replication-controller")
It("should serve a basic image on each replica with a public image [Conformance]", func() { It("should serve a basic image on each replica with a public image [Conformance]", func() {
ServeImageOrFail(framework, "basic", "gcr.io/google_containers/serve_hostname:1.1") ServeImageOrFail(framework, "basic", "gcr.io/google_containers/serve_hostname:1.1")

View File

@ -82,7 +82,7 @@ var _ = Describe("Reboot [Disruptive] [Feature:Reboot]", func() {
} }
}) })
f = NewFramework("reboot") f = NewDefaultFramework("reboot")
It("each node by ordering clean reboot and ensure they function upon restart", func() { It("each node by ordering clean reboot and ensure they function upon restart", func() {
// clean shutdown and restart // clean shutdown and restart

View File

@ -32,7 +32,7 @@ import (
) )
var _ = Describe("ReplicaSet", func() { var _ = Describe("ReplicaSet", func() {
framework := NewFramework("replicaset") framework := NewDefaultFramework("replicaset")
It("should serve a basic image on each replica with a public image [Conformance]", func() { It("should serve a basic image on each replica with a public image [Conformance]", func() {
ReplicaSetServeImageOrFail(framework, "basic", "gcr.io/google_containers/serve_hostname:1.1") ReplicaSetServeImageOrFail(framework, "basic", "gcr.io/google_containers/serve_hostname:1.1")

View File

@ -402,7 +402,7 @@ func expectNodeReadiness(isReady bool, newNode chan *api.Node) {
} }
var _ = Describe("Nodes [Disruptive]", func() { var _ = Describe("Nodes [Disruptive]", func() {
framework := NewFramework("resize-nodes") framework := NewDefaultFramework("resize-nodes")
var systemPodsNo int var systemPodsNo int
var c *client.Client var c *client.Client
var ns string var ns string

View File

@ -35,7 +35,7 @@ const (
) )
var _ = Describe("ResourceQuota", func() { var _ = Describe("ResourceQuota", func() {
f := NewFramework("resourcequota") f := NewDefaultFramework("resourcequota")
It("should create a ResourceQuota and ensure its status is promptly calculated.", func() { It("should create a ResourceQuota and ensure its status is promptly calculated.", func() {
By("Creating a ResourceQuota") By("Creating a ResourceQuota")

View File

@ -49,7 +49,7 @@ const (
) )
var _ = Describe("Restart [Disruptive]", func() { var _ = Describe("Restart [Disruptive]", func() {
f := NewFramework("restart") f := NewDefaultFramework("restart")
var ps *podStore var ps *podStore
BeforeEach(func() { BeforeEach(func() {

View File

@ -150,7 +150,7 @@ var _ = Describe("SchedulerPredicates [Serial]", func() {
} }
}) })
framework := NewFramework("sched-pred") framework := NewDefaultFramework("sched-pred")
BeforeEach(func() { BeforeEach(func() {
c = framework.Client c = framework.Client

View File

@ -26,7 +26,7 @@ import (
) )
var _ = Describe("Secrets", func() { var _ = Describe("Secrets", func() {
f := NewFramework("secrets") f := NewDefaultFramework("secrets")
It("should be consumable from pods in volume [Conformance]", func() { It("should be consumable from pods in volume [Conformance]", func() {
name := "secret-test-" + string(util.NewUUID()) name := "secret-test-" + string(util.NewUUID())

View File

@ -58,7 +58,7 @@ func scTestPod(hostIPC bool, hostPID bool) *api.Pod {
} }
var _ = Describe("Security Context [Feature:SecurityContext]", func() { var _ = Describe("Security Context [Feature:SecurityContext]", func() {
framework := NewFramework("security-context") framework := NewDefaultFramework("security-context")
It("should support pod.Spec.SecurityContext.SupplementalGroups", func() { It("should support pod.Spec.SecurityContext.SupplementalGroups", func() {
pod := scTestPod(false, false) pod := scTestPod(false, false)

View File

@ -62,7 +62,7 @@ const loadBalancerCreateTimeout = 20 * time.Minute
var ServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768} var ServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768}
var _ = Describe("Services", func() { var _ = Describe("Services", func() {
f := NewFramework("services") f := NewDefaultFramework("services")
var c *client.Client var c *client.Client

View File

@ -34,7 +34,7 @@ import (
var serviceAccountTokenNamespaceVersion = version.MustParse("v1.2.0") var serviceAccountTokenNamespaceVersion = version.MustParse("v1.2.0")
var _ = Describe("ServiceAccounts", func() { var _ = Describe("ServiceAccounts", func() {
f := NewFramework("svcaccounts") f := NewDefaultFramework("svcaccounts")
It("should ensure a single API token exists", func() { It("should ensure a single API token exists", func() {
// wait for the service account to reference a single secret // wait for the service account to reference a single secret

View File

@ -40,7 +40,7 @@ func (d durations) Less(i, j int) bool { return d[i] < d[j] }
func (d durations) Swap(i, j int) { d[i], d[j] = d[j], d[i] } func (d durations) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
var _ = Describe("Service endpoints latency", func() { var _ = Describe("Service endpoints latency", func() {
f := NewFramework("svc-latency") f := NewDefaultFramework("svc-latency")
It("should not be very high [Conformance]", func() { It("should not be very high [Conformance]", func() {
const ( const (

View File

@ -210,7 +210,7 @@ var _ = Describe("ServiceLoadBalancer [Feature:ServiceLoadBalancer]", func() {
var repoRoot string var repoRoot string
var client *client.Client var client *client.Client
framework := NewFramework("servicelb") framework := NewDefaultFramework("servicelb")
BeforeEach(func() { BeforeEach(func() {
client = framework.Client client = framework.Client

View File

@ -25,7 +25,7 @@ import (
var _ = Describe("SSH", func() { var _ = Describe("SSH", func() {
f := NewFramework("ssh") f := NewDefaultFramework("ssh")
BeforeEach(func() { BeforeEach(func() {
// When adding more providers here, also implement their functionality in util.go's getSigner(...). // When adding more providers here, also implement their functionality in util.go's getSigner(...).

View File

@ -32,7 +32,7 @@ import (
) )
var _ = Describe("Ubernetes Lite", func() { var _ = Describe("Ubernetes Lite", func() {
framework := NewFramework("ubernetes-lite") framework := NewDefaultFramework("ubernetes-lite")
var zoneCount int var zoneCount int
var err error var err error
image := "gcr.io/google_containers/serve_hostname:1.1" image := "gcr.io/google_containers/serve_hostname:1.1"

View File

@ -353,7 +353,7 @@ func deleteCinderVolume(name string) error {
// These tests need privileged containers, which are disabled by default. Run // These tests need privileged containers, which are disabled by default. Run
// the test with "go run hack/e2e.go ... --ginkgo.focus=[Feature:Volumes]" // the test with "go run hack/e2e.go ... --ginkgo.focus=[Feature:Volumes]"
var _ = Describe("Volumes [Feature:Volumes]", func() { var _ = Describe("Volumes [Feature:Volumes]", func() {
framework := NewFramework("volume") framework := NewDefaultFramework("volume")
// If 'false', the test won't clear its volumes upon completion. Useful for debugging, // If 'false', the test won't clear its volumes upon completion. Useful for debugging,
// note that namespace deletion is handled by delete-namespace flag // note that namespace deletion is handled by delete-namespace flag