mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Revert changes in tests
This commit is contained in:
parent
5e94ffe90b
commit
170d143b1a
@ -75,11 +75,11 @@ const (
|
|||||||
|
|
||||||
// updateMaxRetries is the max retries for a failed node
|
// updateMaxRetries is the max retries for a failed node
|
||||||
updateMaxRetries = 10
|
updateMaxRetries = 10
|
||||||
|
|
||||||
// nodePollInterval is used in listing node
|
|
||||||
nodePollInterval = 10 * time.Second
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// nodePollInterval is used in listing node
|
||||||
|
var nodePollInterval = 10 * time.Second
|
||||||
|
|
||||||
// CIDRAllocator is an interface implemented by things that know how
|
// CIDRAllocator is an interface implemented by things that know how
|
||||||
// to allocate/occupy/recycle CIDR for nodes.
|
// to allocate/occupy/recycle CIDR for nodes.
|
||||||
type CIDRAllocator interface {
|
type CIDRAllocator interface {
|
||||||
|
@ -292,6 +292,13 @@ func TestOccupyPreExistingCIDR(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestAllocateOrOccupyCIDRSuccess(t *testing.T) {
|
func TestAllocateOrOccupyCIDRSuccess(t *testing.T) {
|
||||||
|
// Non-parallel test (overrides global var)
|
||||||
|
oldNodePollInterval := nodePollInterval
|
||||||
|
nodePollInterval = test.NodePollInterval
|
||||||
|
defer func() {
|
||||||
|
nodePollInterval = oldNodePollInterval
|
||||||
|
}()
|
||||||
|
|
||||||
// all tests operate on a single node
|
// all tests operate on a single node
|
||||||
testCases := []testCase{
|
testCases := []testCase{
|
||||||
{
|
{
|
||||||
@ -673,6 +680,13 @@ type releaseTestCase struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestReleaseCIDRSuccess(t *testing.T) {
|
func TestReleaseCIDRSuccess(t *testing.T) {
|
||||||
|
// Non-parallel test (overrides global var)
|
||||||
|
oldNodePollInterval := nodePollInterval
|
||||||
|
nodePollInterval = test.NodePollInterval
|
||||||
|
defer func() {
|
||||||
|
nodePollInterval = oldNodePollInterval
|
||||||
|
}()
|
||||||
|
|
||||||
testCases := []releaseTestCase{
|
testCases := []releaseTestCase{
|
||||||
{
|
{
|
||||||
description: "Correctly release preallocated CIDR",
|
description: "Correctly release preallocated CIDR",
|
||||||
|
Loading…
Reference in New Issue
Block a user