mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #100216 from yangjunmyfm192085/run-test29
Fix misspelling of condition.
This commit is contained in:
commit
c08526c7f7
@ -28,10 +28,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type conditionMergeTestCase struct {
|
type conditionMergeTestCase struct {
|
||||||
description string
|
description string
|
||||||
pvc *v1.PersistentVolumeClaim
|
pvc *v1.PersistentVolumeClaim
|
||||||
newConditions []v1.PersistentVolumeClaimCondition
|
newConditions []v1.PersistentVolumeClaimCondition
|
||||||
finalCondtions []v1.PersistentVolumeClaimCondition
|
finalConditions []v1.PersistentVolumeClaimCondition
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMergeResizeCondition(t *testing.T) {
|
func TestMergeResizeCondition(t *testing.T) {
|
||||||
@ -52,10 +52,10 @@ func TestMergeResizeCondition(t *testing.T) {
|
|||||||
|
|
||||||
testCases := []conditionMergeTestCase{
|
testCases := []conditionMergeTestCase{
|
||||||
{
|
{
|
||||||
description: "when removing all conditions",
|
description: "when removing all conditions",
|
||||||
pvc: pvc.DeepCopy(),
|
pvc: pvc.DeepCopy(),
|
||||||
newConditions: []v1.PersistentVolumeClaimCondition{},
|
newConditions: []v1.PersistentVolumeClaimCondition{},
|
||||||
finalCondtions: []v1.PersistentVolumeClaimCondition{},
|
finalConditions: []v1.PersistentVolumeClaimCondition{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "adding new condition",
|
description: "adding new condition",
|
||||||
@ -66,7 +66,7 @@ func TestMergeResizeCondition(t *testing.T) {
|
|||||||
Status: v1.ConditionTrue,
|
Status: v1.ConditionTrue,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
finalCondtions: []v1.PersistentVolumeClaimCondition{
|
finalConditions: []v1.PersistentVolumeClaimCondition{
|
||||||
{
|
{
|
||||||
Type: v1.PersistentVolumeClaimFileSystemResizePending,
|
Type: v1.PersistentVolumeClaimFileSystemResizePending,
|
||||||
Status: v1.ConditionTrue,
|
Status: v1.ConditionTrue,
|
||||||
@ -83,7 +83,7 @@ func TestMergeResizeCondition(t *testing.T) {
|
|||||||
LastTransitionTime: newTime,
|
LastTransitionTime: newTime,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
finalCondtions: []v1.PersistentVolumeClaimCondition{
|
finalConditions: []v1.PersistentVolumeClaimCondition{
|
||||||
{
|
{
|
||||||
Type: v1.PersistentVolumeClaimResizing,
|
Type: v1.PersistentVolumeClaimResizing,
|
||||||
Status: v1.ConditionTrue,
|
Status: v1.ConditionTrue,
|
||||||
@ -101,7 +101,7 @@ func TestMergeResizeCondition(t *testing.T) {
|
|||||||
LastTransitionTime: conditionFalseTime,
|
LastTransitionTime: conditionFalseTime,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
finalCondtions: []v1.PersistentVolumeClaimCondition{
|
finalConditions: []v1.PersistentVolumeClaimCondition{
|
||||||
{
|
{
|
||||||
Type: v1.PersistentVolumeClaimResizing,
|
Type: v1.PersistentVolumeClaimResizing,
|
||||||
Status: v1.ConditionFalse,
|
Status: v1.ConditionFalse,
|
||||||
@ -119,7 +119,7 @@ func TestMergeResizeCondition(t *testing.T) {
|
|||||||
LastTransitionTime: currentTime,
|
LastTransitionTime: currentTime,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
finalCondtions: []v1.PersistentVolumeClaimCondition{
|
finalConditions: []v1.PersistentVolumeClaimCondition{
|
||||||
{
|
{
|
||||||
Type: v1.PersistentVolumeClaimResizing,
|
Type: v1.PersistentVolumeClaimResizing,
|
||||||
Status: v1.ConditionTrue,
|
Status: v1.ConditionTrue,
|
||||||
@ -133,10 +133,10 @@ func TestMergeResizeCondition(t *testing.T) {
|
|||||||
updatePVC := MergeResizeConditionOnPVC(testcase.pvc, testcase.newConditions)
|
updatePVC := MergeResizeConditionOnPVC(testcase.pvc, testcase.newConditions)
|
||||||
|
|
||||||
updateConditions := updatePVC.Status.Conditions
|
updateConditions := updatePVC.Status.Conditions
|
||||||
if !reflect.DeepEqual(updateConditions, testcase.finalCondtions) {
|
if !reflect.DeepEqual(updateConditions, testcase.finalConditions) {
|
||||||
t.Errorf("Expected updated conditions for test %s to be %v but got %v",
|
t.Errorf("Expected updated conditions for test %s to be %v but got %v",
|
||||||
testcase.description,
|
testcase.description,
|
||||||
testcase.finalCondtions, updateConditions)
|
testcase.finalConditions, updateConditions)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ type Interface interface {
|
|||||||
// )
|
// )
|
||||||
GuaranteedUpdate(
|
GuaranteedUpdate(
|
||||||
ctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,
|
ctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool,
|
||||||
precondtions *Preconditions, tryUpdate UpdateFunc, cachedExistingObject runtime.Object) error
|
preconditions *Preconditions, tryUpdate UpdateFunc, cachedExistingObject runtime.Object) error
|
||||||
|
|
||||||
// Count returns number of different entries under the key (generally being path prefix).
|
// Count returns number of different entries under the key (generally being path prefix).
|
||||||
Count(key string) (int64, error)
|
Count(key string) (int64, error)
|
||||||
|
Loading…
Reference in New Issue
Block a user