Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix staticcheck failures in test/e2e/windows #83714

Merged
merged 1 commit into from Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion hack/.staticcheck_failures
Expand Up @@ -81,7 +81,6 @@ test/e2e/storage/utils
test/e2e/storage/vsphere
test/e2e/upgrades
test/e2e/upgrades/storage
test/e2e/windows
test/images/agnhost/dns
test/images/agnhost/inclusterclient
test/images/agnhost/net/nat
Expand Down
1 change: 0 additions & 1 deletion test/e2e/windows/BUILD
Expand Up @@ -36,7 +36,6 @@ go_library(
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
"//staging/src/k8s.io/kubelet/config/v1beta1:go_default_library",
"//test/e2e/framework:go_default_library",
"//test/e2e/framework/kubelet:go_default_library",
"//test/e2e/framework/metrics:go_default_library",
"//test/e2e/framework/network:go_default_library",
"//test/e2e/framework/node:go_default_library",
Expand Down
8 changes: 1 addition & 7 deletions test/e2e/windows/density.go
Expand Up @@ -30,7 +30,6 @@ import (
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
"k8s.io/kubernetes/test/e2e/framework"
e2ekubelet "k8s.io/kubernetes/test/e2e/framework/kubelet"
e2emetrics "k8s.io/kubernetes/test/e2e/framework/metrics"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
imageutils "k8s.io/kubernetes/test/utils/image"
Expand Down Expand Up @@ -75,17 +74,13 @@ var _ = SIGDescribe("[Feature:Windows] Density [Serial] [Slow]", func() {
type densityTest struct {
// number of pods
podsNr int
// number of background pods
bgPodsNr int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @kubernetes/sig-scalability-pr-reviews @kubernetes/sig-windows-misc on removal of these. was the intent for these types to remain as close as possible to the original types in test/e2e_node?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liggitt these vars still remain?THX

// interval between creating pod (rate control)
interval time.Duration
// create pods in 'batch' or 'sequence'
createMethod string
// API QPS limit
APIQPSLimit int
// performance limits
cpuLimits e2ekubelet.ContainersCPUSummary
memLimits e2ekubelet.ResourceUsagePerContainer
podStartupLimits e2emetrics.LatencyMetric
podBatchStartupLimit time.Duration
}
Expand All @@ -97,7 +92,7 @@ func runDensityBatchTest(f *framework.Framework, testArg densityTest) (time.Dura
)
var (
mutex = &sync.Mutex{}
watchTimes = make(map[string]metav1.Time, 0)
watchTimes = make(map[string]metav1.Time)
stopCh = make(chan struct{})
)

Expand Down Expand Up @@ -278,5 +273,4 @@ func deletePodsSync(f *framework.Framework, pods []*v1.Pod) {
}(pod)
}
wg.Wait()
return
}
4 changes: 1 addition & 3 deletions test/e2e/windows/dns.go
Expand Up @@ -28,9 +28,6 @@ import (
"github.com/onsi/ginkgo"
)

const dnsTestPodHostName = "dns-querier-1"
const dnsTestServiceName = "dns-test-service"

var _ = SIGDescribe("DNS", func() {

ginkgo.BeforeEach(func() {
Expand Down Expand Up @@ -76,6 +73,7 @@ var _ = SIGDescribe("DNS", func() {

framework.Logf("ipconfig /all:\n%s", stdout)
dnsRegex, err := regexp.Compile(`DNS Servers[\s*.]*:(\s*[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})+`)
framework.ExpectNoError(err)

if dnsRegex.MatchString(stdout) {
match := dnsRegex.FindString(stdout)
Expand Down