mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
rkt: Refactor the systemd interface.
Replace shell out calls with dbus API calls. Remove unused 'Reload()'.
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -1626,13 +1627,20 @@ func TestGarbageCollect(t *testing.T) {
|
||||
|
||||
sort.Sort(sortedStringList(tt.expectedServiceFiles))
|
||||
sort.Sort(sortedStringList(fakeOS.Removes))
|
||||
sort.Sort(sortedStringList(fs.resetFailedUnits))
|
||||
|
||||
assert.Equal(t, tt.expectedServiceFiles, fakeOS.Removes, testCaseHint)
|
||||
var expectedService []string
|
||||
for _, f := range tt.expectedServiceFiles {
|
||||
expectedService = append(expectedService, filepath.Base(f))
|
||||
}
|
||||
assert.Equal(t, expectedService, fs.resetFailedUnits, testCaseHint)
|
||||
|
||||
// Cleanup after each test.
|
||||
cli.Reset()
|
||||
ctrl.Finish()
|
||||
fakeOS.Removes = []string{}
|
||||
fs.resetFailedUnits = []string{}
|
||||
getter.pods = make(map[kubetypes.UID]*api.Pod)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user