mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +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 {
|
||||
description string
|
||||
pvc *v1.PersistentVolumeClaim
|
||||
newConditions []v1.PersistentVolumeClaimCondition
|
||||
finalCondtions []v1.PersistentVolumeClaimCondition
|
||||
description string
|
||||
pvc *v1.PersistentVolumeClaim
|
||||
newConditions []v1.PersistentVolumeClaimCondition
|
||||
finalConditions []v1.PersistentVolumeClaimCondition
|
||||
}
|
||||
|
||||
func TestMergeResizeCondition(t *testing.T) {
|
||||
@ -52,10 +52,10 @@ func TestMergeResizeCondition(t *testing.T) {
|
||||
|
||||
testCases := []conditionMergeTestCase{
|
||||
{
|
||||
description: "when removing all conditions",
|
||||
pvc: pvc.DeepCopy(),
|
||||
newConditions: []v1.PersistentVolumeClaimCondition{},
|
||||
finalCondtions: []v1.PersistentVolumeClaimCondition{},
|
||||
description: "when removing all conditions",
|
||||
pvc: pvc.DeepCopy(),
|
||||
newConditions: []v1.PersistentVolumeClaimCondition{},
|
||||
finalConditions: []v1.PersistentVolumeClaimCondition{},
|
||||
},
|
||||
{
|
||||
description: "adding new condition",
|
||||
@ -66,7 +66,7 @@ func TestMergeResizeCondition(t *testing.T) {
|
||||
Status: v1.ConditionTrue,
|
||||
},
|
||||
},
|
||||
finalCondtions: []v1.PersistentVolumeClaimCondition{
|
||||
finalConditions: []v1.PersistentVolumeClaimCondition{
|
||||
{
|
||||
Type: v1.PersistentVolumeClaimFileSystemResizePending,
|
||||
Status: v1.ConditionTrue,
|
||||
@ -83,7 +83,7 @@ func TestMergeResizeCondition(t *testing.T) {
|
||||
LastTransitionTime: newTime,
|
||||
},
|
||||
},
|
||||
finalCondtions: []v1.PersistentVolumeClaimCondition{
|
||||
finalConditions: []v1.PersistentVolumeClaimCondition{
|
||||
{
|
||||
Type: v1.PersistentVolumeClaimResizing,
|
||||
Status: v1.ConditionTrue,
|
||||
@ -101,7 +101,7 @@ func TestMergeResizeCondition(t *testing.T) {
|
||||
LastTransitionTime: conditionFalseTime,
|
||||
},
|
||||
},
|
||||
finalCondtions: []v1.PersistentVolumeClaimCondition{
|
||||
finalConditions: []v1.PersistentVolumeClaimCondition{
|
||||
{
|
||||
Type: v1.PersistentVolumeClaimResizing,
|
||||
Status: v1.ConditionFalse,
|
||||
@ -119,7 +119,7 @@ func TestMergeResizeCondition(t *testing.T) {
|
||||
LastTransitionTime: currentTime,
|
||||
},
|
||||
},
|
||||
finalCondtions: []v1.PersistentVolumeClaimCondition{
|
||||
finalConditions: []v1.PersistentVolumeClaimCondition{
|
||||
{
|
||||
Type: v1.PersistentVolumeClaimResizing,
|
||||
Status: v1.ConditionTrue,
|
||||
@ -133,10 +133,10 @@ func TestMergeResizeCondition(t *testing.T) {
|
||||
updatePVC := MergeResizeConditionOnPVC(testcase.pvc, testcase.newConditions)
|
||||
|
||||
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",
|
||||
testcase.description,
|
||||
testcase.finalCondtions, updateConditions)
|
||||
testcase.finalConditions, updateConditions)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ type Interface interface {
|
||||
// )
|
||||
GuaranteedUpdate(
|
||||
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(key string) (int64, error)
|
||||
|
Loading…
Reference in New Issue
Block a user