mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #64155 from figo/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. improve test: verify kubelet.config.Restore only happen once **What this PR does / why we need it**: This patch is to add additional test coverage of pod config restore, it verifies that restore can only happen once. in the second restore attempt, we should expect no error and no channel update. **Which issue(s) this PR fixes**: this is a test improvement based on test been added at https://github.com/kubernetes/kubernetes/pull/63553 **Special notes for your reviewer**: **Release note**: ```release-note None ``` /sig node /cc @rphillips @jiayingz @vikaschoudhary16 @anfernee @Random-Liu @dchen1107 @derekwaynecarr @vishh @yujuhong @tallclair
This commit is contained in:
commit
c6e0a225f9
@ -451,4 +451,10 @@ func TestPodRestore(t *testing.T) {
|
||||
t.Fatalf("Restore returned error: %v", err)
|
||||
}
|
||||
expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.RESTORE, kubetypes.ApiserverSource, pod))
|
||||
|
||||
// Verify Restore only happen once
|
||||
if err := config.Restore(tmpDir, channel); err != nil {
|
||||
t.Fatalf("The second restore returned error: %v", err)
|
||||
}
|
||||
expectNoPodUpdate(t, ch)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user