- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for TestingBlock (0.17 sec)
-
pkg/kubelet/token/token_manager_test.go
"time" authenticationv1 "k8s.io/api/authentication/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" testingclock "k8s.io/utils/clock/testing" ) func TestTokenCachingAndExpiration(t *testing.T) { type suite struct { clock *testingclock.FakeClock tg *fakeTokenGetter mgr *Manager } cases := []struct { name string exp time.Duration
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 04 00:16:47 UTC 2022 - 16.2K bytes - Viewed (0) -
pkg/kubelet/util/node_startup_latency_tracker_test.go
package util import ( "strings" "testing" "time" "github.com/stretchr/testify/assert" "k8s.io/component-base/metrics/testutil" "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/utils/clock" testingclock "k8s.io/utils/clock/testing" ) const ( metricsNameNodeStartupPreKubelet = "kubelet_node_startup_pre_kubelet_duration_seconds"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 11 05:54:25 UTC 2023 - 18K bytes - Viewed (0) -
pkg/controller/daemon/update_test.go
// all old pods are unavailable so should be surged manager.failedPodsBackoff.Clock = testingclock.NewFakeClock(time.Unix(100, 0)) clearExpectations(t, manager, ds, podControl) expectSyncDaemonSets(t, manager, ds, podControl, 5, 0, 0) // waiting for pods to go ready, old pods are deleted manager.failedPodsBackoff.Clock = testingclock.NewFakeClock(time.Unix(200, 0)) clearExpectations(t, manager, ds, podControl)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Feb 10 21:10:35 UTC 2024 - 28.9K bytes - Viewed (0) -
pkg/kubelet/util/manager/cache_based_manager_test.go
"k8s.io/apimachinery/pkg/util/sets" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" core "k8s.io/client-go/testing" podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/utils/clock" testingclock "k8s.io/utils/clock/testing" "github.com/stretchr/testify/assert" ) func checkObject(t *testing.T, store *objectStore, ns, name string, shouldExist bool) { _, err := store.Get(ns, name)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 06:25:43 UTC 2024 - 19.6K bytes - Viewed (0) -
pkg/kubelet/util/pod_startup_latency_tracker_test.go
corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/component-base/metrics/testutil" "k8s.io/kubernetes/pkg/kubelet/metrics" testingclock "k8s.io/utils/clock/testing" ) var frozenTime = time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) const ( uid = "3c1df8a9-11a8-4791-aeae-184c18cca686" metricsName = "kubelet_pod_start_sli_duration_seconds"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 15 06:09:49 UTC 2023 - 13.7K bytes - Viewed (0) -
pkg/kubelet/util/manager/watch_based_manager_test.go
clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" core "k8s.io/client-go/testing" corev1 "k8s.io/kubernetes/pkg/apis/core/v1" "k8s.io/utils/clock" testingclock "k8s.io/utils/clock/testing" "github.com/stretchr/testify/assert" ) func listSecret(fakeClient clientset.Interface) listObjectFunc { return func(namespace string, opts metav1.ListOptions) (runtime.Object, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 09 10:05:43 UTC 2023 - 17.2K bytes - Viewed (0) -
pkg/kubelet/logs/container_log_manager_test.go
"k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/workqueue" "k8s.io/kubernetes/pkg/kubelet/container" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" critest "k8s.io/cri-api/pkg/apis/testing" testingclock "k8s.io/utils/clock/testing" ) func TestGetAllLogs(t *testing.T) { dir, err := os.MkdirTemp("", "test-get-all-logs") require.NoError(t, err) defer os.RemoveAll(dir) testLogs := []string{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 12.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/loop_test.go
limitations under the License. */ package wait import ( "context" "errors" "fmt" "reflect" "testing" "time" "github.com/google/go-cmp/cmp" "k8s.io/utils/clock" testingclock "k8s.io/utils/clock/testing" ) func timerWithClock(t Timer, c clock.WithTicker) Timer { switch t := t.(type) { case *fixedTimer: t.new = c.NewTicker case *variableTimer: t.new = c.NewTimer default:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 19 02:48:08 UTC 2023 - 15.8K bytes - Viewed (0) -
pkg/kubelet/stats/cri_stats_provider_windows_test.go
statsapi "k8s.io/kubelet/pkg/apis/stats/v1alpha1" kubecontainertest "k8s.io/kubernetes/pkg/kubelet/container/testing" "k8s.io/kubernetes/pkg/kubelet/kuberuntime" "k8s.io/kubernetes/pkg/volume" testingclock "k8s.io/utils/clock/testing" ) type fakeNetworkStatsProvider struct { containers []containerStats } type containerStats struct { container hcsshim.ContainerProperties hcsStats []hcsshim.NetworkStats
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Feb 17 00:02:10 UTC 2024 - 13.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/wait_test.go
backoffMgr := NewJitteredBackoffManager(1, 1, testingclock.NewFakeClock(time.Now())) for i := 0; i < 5; i++ { backoff := backoffMgr.(*jitteredBackoffManagerImpl).getNextBackoff() if backoff < 1 || backoff > 2 { t.Errorf("backoff out of range: %d", backoff) } } // negative jitter, shall be a fixed backoff backoffMgr = NewJitteredBackoffManager(1, -1, testingclock.NewFakeClock(time.Now()))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 26 16:28:45 UTC 2024 - 41.1K bytes - Viewed (0)