mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Minor cleanup in etcd3 tests
This commit is contained in:
parent
e6ddb69e6f
commit
83399ccfb8
@ -27,7 +27,6 @@ import (
|
|||||||
"k8s.io/apiserver/pkg/storage"
|
"k8s.io/apiserver/pkg/storage"
|
||||||
"k8s.io/apiserver/pkg/storage/etcd3/testserver"
|
"k8s.io/apiserver/pkg/storage/etcd3/testserver"
|
||||||
storagetesting "k8s.io/apiserver/pkg/storage/testing"
|
storagetesting "k8s.io/apiserver/pkg/storage/testing"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestWatch(t *testing.T) {
|
func TestWatch(t *testing.T) {
|
||||||
@ -62,6 +61,32 @@ func TestWatchContextCancel(t *testing.T) {
|
|||||||
storagetesting.RunTestWatchContextCancel(ctx, t, store)
|
storagetesting.RunTestWatchContextCancel(ctx, t, store)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestWatchDeleteEventObjectHaveLatestRV(t *testing.T) {
|
||||||
|
ctx, store, _ := testSetup(t)
|
||||||
|
storagetesting.RunTestWatchDeleteEventObjectHaveLatestRV(ctx, t, store)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestWatchInitializationSignal(t *testing.T) {
|
||||||
|
ctx, store, _ := testSetup(t)
|
||||||
|
storagetesting.RunTestWatchInitializationSignal(ctx, t, store)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestProgressNotify(t *testing.T) {
|
||||||
|
clusterConfig := testserver.NewTestConfig(t)
|
||||||
|
clusterConfig.ExperimentalWatchProgressNotifyInterval = time.Second
|
||||||
|
ctx, store, _ := testSetup(t, withClientConfig(clusterConfig))
|
||||||
|
|
||||||
|
storagetesting.RunOptionalTestProgressNotify(ctx, t, store)
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// Implementation-specific tests are following.
|
||||||
|
// The following tests are exercising the details of the implementation
|
||||||
|
// not the actual user-facing contract of storage interface.
|
||||||
|
// As such, they may focus e.g. on non-functional aspects like performance
|
||||||
|
// impact.
|
||||||
|
// =======================================================================
|
||||||
|
|
||||||
func TestWatchErrResultNotBlockAfterCancel(t *testing.T) {
|
func TestWatchErrResultNotBlockAfterCancel(t *testing.T) {
|
||||||
origCtx, store, _ := testSetup(t)
|
origCtx, store, _ := testSetup(t)
|
||||||
ctx, cancel := context.WithCancel(origCtx)
|
ctx, cancel := context.WithCancel(origCtx)
|
||||||
@ -83,21 +108,3 @@ func TestWatchErrResultNotBlockAfterCancel(t *testing.T) {
|
|||||||
cancel()
|
cancel()
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestWatchDeleteEventObjectHaveLatestRV(t *testing.T) {
|
|
||||||
ctx, store, _ := testSetup(t)
|
|
||||||
storagetesting.RunTestWatchDeleteEventObjectHaveLatestRV(ctx, t, store)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestWatchInitializationSignal(t *testing.T) {
|
|
||||||
ctx, store, _ := testSetup(t)
|
|
||||||
storagetesting.RunTestWatchInitializationSignal(ctx, t, store)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestProgressNotify(t *testing.T) {
|
|
||||||
clusterConfig := testserver.NewTestConfig(t)
|
|
||||||
clusterConfig.ExperimentalWatchProgressNotifyInterval = time.Second
|
|
||||||
ctx, store, _ := testSetup(t, withClientConfig(clusterConfig))
|
|
||||||
|
|
||||||
storagetesting.RunOptionalTestProgressNotify(ctx, t, store)
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user