Merge pull request #105377 from damemi/wire-contexts-apps
Wire contexts to Apps controllers
This commit is contained in:
@@ -57,8 +57,8 @@ func TestNewDeployment(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Wait for the Deployment to be updated to revision 1
|
||||
if err := tester.waitForDeploymentRevisionAndImage("1", fakeImage); err != nil {
|
||||
@@ -124,8 +124,8 @@ func TestDeploymentRollingUpdate(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
replicas := int32(20)
|
||||
tester := &deploymentTester{t: t, c: c, deployment: newDeployment(name, ns.Name, replicas)}
|
||||
@@ -267,8 +267,8 @@ func TestPausedDeployment(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Verify that the paused deployment won't create new replica set.
|
||||
if err := tester.expectNoNewReplicaSet(); err != nil {
|
||||
@@ -368,8 +368,8 @@ func TestScalePausedDeployment(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Wait for the Deployment to be updated to revision 1
|
||||
if err := tester.waitForDeploymentRevisionAndImage("1", fakeImage); err != nil {
|
||||
@@ -449,8 +449,8 @@ func TestDeploymentHashCollision(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Wait for the Deployment to be updated to revision 1
|
||||
if err := tester.waitForDeploymentRevisionAndImage("1", fakeImage); err != nil {
|
||||
@@ -552,8 +552,8 @@ func TestFailedDeployment(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
if err = tester.waitForDeploymentUpdatedReplicasGTE(replicas); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -594,8 +594,8 @@ func TestOverlappingDeployments(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Create 2 deployments with overlapping selectors
|
||||
var err error
|
||||
@@ -668,8 +668,8 @@ func TestScaledRolloutDeployment(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Create a deployment with rolling update strategy, max surge = 3, and max unavailable = 2
|
||||
var err error
|
||||
@@ -871,8 +871,8 @@ func TestSpecReplicasChange(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Scale up/down deployment and verify its replicaset has matching .spec.replicas
|
||||
if err = tester.scaleDeployment(2); err != nil {
|
||||
@@ -929,8 +929,8 @@ func TestDeploymentAvailableCondition(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Wait for the deployment to be observed by the controller and has at least specified number of updated replicas
|
||||
if err = tester.waitForDeploymentUpdatedReplicasGTE(replicas); err != nil {
|
||||
@@ -1046,8 +1046,8 @@ func TestGeneralReplicaSetAdoption(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Wait for the Deployment to be updated to revision 1
|
||||
if err := tester.waitForDeploymentRevisionAndImage("1", fakeImage); err != nil {
|
||||
@@ -1138,8 +1138,8 @@ func TestDeploymentScaleSubresource(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Wait for the Deployment to be updated to revision 1
|
||||
if err := tester.waitForDeploymentRevisionAndImage("1", fakeImage); err != nil {
|
||||
@@ -1182,8 +1182,8 @@ func TestReplicaSetOrphaningAndAdoptionWhenLabelsChange(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
informers.Start(stopCh)
|
||||
go rm.Run(5, stopCh)
|
||||
go dc.Run(5, stopCh)
|
||||
go rm.Run(context.TODO(), 5)
|
||||
go dc.Run(context.TODO(), 5)
|
||||
|
||||
// Wait for the Deployment to be updated to revision 1
|
||||
if err := tester.waitForDeploymentRevisionAndImage("1", fakeImage); err != nil {
|
||||
|
Reference in New Issue
Block a user