Unverified Commit c6e0a225 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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
parents 10b9fd3a bf48d39f
...@@ -451,4 +451,10 @@ func TestPodRestore(t *testing.T) { ...@@ -451,4 +451,10 @@ func TestPodRestore(t *testing.T) {
t.Fatalf("Restore returned error: %v", err) t.Fatalf("Restore returned error: %v", err)
} }
expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.RESTORE, kubetypes.ApiserverSource, pod)) 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)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment