(t *testing.T, signal syscall.Signal)
| 841 | } |
| 842 | |
| 843 | func RestartContainerd(t *testing.T, signal syscall.Signal) { |
| 844 | require.NoError(t, KillProcess(*containerdBin, signal)) |
| 845 | |
| 846 | // Use assert so that the 3rd wait always runs, this makes sure |
| 847 | // containerd is running before this function returns. |
| 848 | assert.NoError(t, Eventually(func() (bool, error) { |
| 849 | pid, err := PidOf(*containerdBin) |
| 850 | if err != nil { |
| 851 | return false, err |
| 852 | } |
| 853 | return pid == 0, nil |
| 854 | }, time.Second, 30*time.Second), "wait for containerd to be killed") |
| 855 | |
| 856 | require.NoError(t, Eventually(func() (bool, error) { |
| 857 | return ConnectDaemons() == nil, nil |
| 858 | }, time.Second, 30*time.Second), "wait for containerd to be restarted") |
| 859 | } |
| 860 | |
| 861 | // EnsureImageExists pulls the given image, ensures that no error was encountered |
| 862 | // while pulling it. |
no test coverage detected
searching dependent graphs…