mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Merge pull request #105510 from damemi/wire-contexts-bootstrap
Wire contexts to Bootstrap controllers
This commit is contained in:
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package bootstrap
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -57,7 +58,7 @@ func TestCleanerNoExpiration(t *testing.T) {
|
||||
secret := newTokenSecret("tokenID", "tokenSecret")
|
||||
secrets.Informer().GetIndexer().Add(secret)
|
||||
|
||||
cleaner.evalSecret(secret)
|
||||
cleaner.evalSecret(context.TODO(), secret)
|
||||
|
||||
expected := []core.Action{}
|
||||
|
||||
@@ -74,7 +75,7 @@ func TestCleanerExpired(t *testing.T) {
|
||||
addSecretExpiration(secret, timeString(-time.Hour))
|
||||
secrets.Informer().GetIndexer().Add(secret)
|
||||
|
||||
cleaner.evalSecret(secret)
|
||||
cleaner.evalSecret(context.TODO(), secret)
|
||||
|
||||
expected := []core.Action{
|
||||
core.NewDeleteActionWithOptions(
|
||||
@@ -99,7 +100,7 @@ func TestCleanerNotExpired(t *testing.T) {
|
||||
addSecretExpiration(secret, timeString(time.Hour))
|
||||
secrets.Informer().GetIndexer().Add(secret)
|
||||
|
||||
cleaner.evalSecret(secret)
|
||||
cleaner.evalSecret(context.TODO(), secret)
|
||||
|
||||
expected := []core.Action{}
|
||||
|
||||
@@ -118,7 +119,7 @@ func TestCleanerExpiredAt(t *testing.T) {
|
||||
cleaner.enqueueSecrets(secret)
|
||||
expected := []core.Action{}
|
||||
verifyFunc := func() {
|
||||
cleaner.processNextWorkItem()
|
||||
cleaner.processNextWorkItem(context.TODO())
|
||||
verifyActions(t, expected, cl.Actions())
|
||||
}
|
||||
// token has not expired currently
|
||||
|
||||
Reference in New Issue
Block a user