mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Remove invalid emulated version and add lexographical order test
This commit is contained in:
parent
9b57a960f8
commit
775b118a6d
@ -404,6 +404,22 @@ func TestCompare(t *testing.T) {
|
||||
},
|
||||
expectedResult: 1,
|
||||
},
|
||||
{
|
||||
name: "lhs less than rhs, lexographical order check",
|
||||
lhs: &v1alpha2.LeaseCandidate{
|
||||
Spec: v1alpha2.LeaseCandidateSpec{
|
||||
EmulationVersion: "1.2.0",
|
||||
BinaryVersion: "1.20.0",
|
||||
},
|
||||
},
|
||||
rhs: &v1alpha2.LeaseCandidate{
|
||||
Spec: v1alpha2.LeaseCandidateSpec{
|
||||
EmulationVersion: "1.19.0",
|
||||
BinaryVersion: "1.20.0",
|
||||
},
|
||||
},
|
||||
expectedResult: -1,
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
|
@ -149,8 +149,7 @@ func TestMultipleLeaseCandidate(t *testing.T) {
|
||||
go cletest.createAndRunFakeController("baz1", "default", "baz", "1.20.0", "1.20.0", tc.preferredStrategy)
|
||||
go cletest.createAndRunFakeController("baz2", "default", "baz", "1.20.0", "1.19.0", tc.preferredStrategy)
|
||||
go cletest.createAndRunFakeController("baz3", "default", "baz", "1.19.0", "1.19.0", tc.preferredStrategy)
|
||||
go cletest.createAndRunFakeController("baz4", "default", "baz", "1.2.0", "1.19.0", tc.preferredStrategy)
|
||||
go cletest.createAndRunFakeController("baz5", "default", "baz", "1.20.0", "1.19.0", tc.preferredStrategy)
|
||||
go cletest.createAndRunFakeController("baz4", "default", "baz", "1.20.0", "1.19.0", tc.preferredStrategy)
|
||||
cletest.pollForLease(ctx, "baz", "default", tc.expectedHolderIdentity)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user