Remove unused variables (only assigned to) from test code.

This is revealed by the go/types package, which is stricter than
the Go compiler about unused variables. See also: golang/go#8560
This commit is contained in:
Ryan Hitchman
2018-02-02 13:34:57 -08:00
parent b79fe10730
commit e04b91facf
13 changed files with 10 additions and 38 deletions

View File

@@ -202,7 +202,7 @@ func enableCPUManagerInKubelet(f *framework.Framework) (oldCfg *kubeletconfig.Ku
}
func runCPUManagerTests(f *framework.Framework) {
var cpuCap, cpuAlloc, cpuRes int64
var cpuCap, cpuAlloc int64
var oldCfg *kubeletconfig.KubeletConfiguration
var cpuListString, expAllowedCPUsListRegex string
var cpuList []int
@@ -213,7 +213,7 @@ func runCPUManagerTests(f *framework.Framework) {
var pod, pod1, pod2 *v1.Pod
It("should assign CPUs as expected based on the Pod spec", func() {
cpuCap, cpuAlloc, cpuRes = getLocalNodeCPUDetails(f)
cpuCap, cpuAlloc, _ = getLocalNodeCPUDetails(f)
// Skip CPU Manager tests altogether if the CPU capacity < 2.
if cpuCap < 2 {