var _ … func newRC(rsName string, replicas int32, rcPodLabels map[string]string, imageName string, image string, args []string) *v1.ReplicationController { … } // TestReplicationControllerServeImageOrFail is a basic test to check // the deployment of an image using a replication controller. // The image serves its hostname which is checked for each replica. func TestReplicationControllerServeImageOrFail(ctx context.Context, f *framework.Framework, test string, image string) { … } // 1. Create a quota restricting pods in the current namespace to 2. // 2. Create a replication controller that wants to run 3 pods. // 3. Check replication controller conditions for a ReplicaFailure condition. // 4. Relax quota or scale down the controller and observe the condition is gone. func testReplicationControllerConditionCheck(ctx context.Context, f *framework.Framework) { … } func testRCAdoptMatchingOrphans(ctx context.Context, f *framework.Framework) { … } func testRCReleaseControlledNotMatching(ctx context.Context, f *framework.Framework) { … } type updateRcFunc … // updateReplicationControllerWithRetries retries updating the given rc on conflict with the following steps: // 1. Get latest resource // 2. applyUpdate // 3. Update the resource func updateReplicationControllerWithRetries(ctx context.Context, c clientset.Interface, namespace, name string, applyUpdate updateRcFunc) (*v1.ReplicationController, error) { … } // watchUntilWithoutRetry ... // reads items from the watch until each provided condition succeeds, and then returns the last watch // encountered. The first condition that returns an error terminates the watch (and the event is also returned). // If no event has been received, the returned event will be nil. // Conditions are satisfied sequentially so as to provide a useful primitive for higher level composition. // Waits until context deadline or until context is canceled. // // the same as watchtools.UntilWithoutRetry, just without the closing of the watch - as for the purpose of being paired with WatchEventSequenceVerifier, the watch is needed for continual watch event collection func watchUntilWithoutRetry(ctx context.Context, watcher watch.Interface, conditions ...watchtools.ConditionFunc) (*watch.Event, error) { … } func checkReplicationControllerStatusReplicaCount(f *framework.Framework, rcName string, quantity int32) func(ctx context.Context) (bool, error) { … }