mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Unify fake runtime helper in kuberuntime, rkt and dockertools.
This commit is contained in:
@@ -585,7 +585,7 @@ func TestGetPodStatus(t *testing.T) {
|
||||
fs := newFakeSystemd()
|
||||
fnp := nettest.NewMockNetworkPlugin(ctrl)
|
||||
fos := &containertesting.FakeOS{}
|
||||
frh := &fakeRuntimeHelper{}
|
||||
frh := &containertesting.FakeRuntimeHelper{}
|
||||
r := &Runtime{
|
||||
apisvc: fr,
|
||||
systemd: fs,
|
||||
@@ -1391,7 +1391,12 @@ func TestGenerateRunCommand(t *testing.T) {
|
||||
for i, tt := range tests {
|
||||
testCaseHint := fmt.Sprintf("test case #%d", i)
|
||||
rkt.network = network.NewPluginManager(tt.networkPlugin)
|
||||
rkt.runtimeHelper = &fakeRuntimeHelper{tt.dnsServers, tt.dnsSearches, tt.hostName, "", tt.err}
|
||||
rkt.runtimeHelper = &containertesting.FakeRuntimeHelper{
|
||||
DNSServers: tt.dnsServers,
|
||||
DNSSearches: tt.dnsSearches,
|
||||
HostName: tt.hostName,
|
||||
Err: tt.err,
|
||||
}
|
||||
rkt.execer = &utilexec.FakeExec{CommandScript: []utilexec.FakeCommandAction{func(cmd string, args ...string) utilexec.Cmd {
|
||||
return utilexec.InitFakeCmd(&utilexec.FakeCmd{}, cmd, args...)
|
||||
}}}
|
||||
|
||||
Reference in New Issue
Block a user