mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
All e2e tests should use NewFramework
Allows someone to replace createTestingNS consistently
This commit is contained in:
@@ -175,24 +175,13 @@ func waitForStableCluster(c *client.Client) int {
|
||||
}
|
||||
|
||||
var _ = Describe("SchedulerPredicates", func() {
|
||||
framework := Framework{BaseName: "sched-pred"}
|
||||
var c *client.Client
|
||||
var nodeList *api.NodeList
|
||||
var totalPodCapacity int64
|
||||
var RCName string
|
||||
var ns string
|
||||
|
||||
BeforeEach(func() {
|
||||
framework.beforeEach()
|
||||
c = framework.Client
|
||||
ns = framework.Namespace.Name
|
||||
var err error
|
||||
nodeList, err = c.Nodes().List(labels.Everything(), fields.Everything())
|
||||
expectNoError(err)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
defer framework.afterEach()
|
||||
rc, err := c.ReplicationControllers(ns).Get(RCName)
|
||||
if err == nil && rc.Spec.Replicas != 0 {
|
||||
By("Cleaning up the replication controller")
|
||||
@@ -201,6 +190,16 @@ var _ = Describe("SchedulerPredicates", func() {
|
||||
}
|
||||
})
|
||||
|
||||
framework := NewFramework("sched-pred")
|
||||
|
||||
BeforeEach(func() {
|
||||
c = framework.Client
|
||||
ns = framework.Namespace.Name
|
||||
var err error
|
||||
nodeList, err = c.Nodes().List(labels.Everything(), fields.Everything())
|
||||
expectNoError(err)
|
||||
})
|
||||
|
||||
// This test verifies that max-pods flag works as advertised. It assumes that cluster add-on pods stay stable
|
||||
// and cannot be run in parallel with any other test that touches Nodes or Pods. It is so because to check
|
||||
// if max-pods is working we need to fully saturate the cluster and keep it in this state for few seconds.
|
||||
|
||||
Reference in New Issue
Block a user