From 321b690f6284c7c0f756a899d0bcdf3bd02190f0 Mon Sep 17 00:00:00 2001 From: hwdef Date: Fri, 20 Sep 2019 12:09:40 +0800 Subject: [PATCH] fix(test): delete unused unused var or const --- .../logging/stackdriver/soak.go | 3 --- test/e2e/node/kubelet_perf.go | 2 -- test/e2e/storage/volume_provisioning.go | 2 -- test/e2e/ui/dashboard.go | 1 - test/e2e_node/util.go | 1 - test/integration/framework/util.go | 7 ----- .../master/synthetic_master_test.go | 27 ------------------- .../scheduler_perf/scheduler_test.go | 6 ++--- 8 files changed, 2 insertions(+), 47 deletions(-) diff --git a/test/e2e/instrumentation/logging/stackdriver/soak.go b/test/e2e/instrumentation/logging/stackdriver/soak.go index 14df92bdcc1..d411065f997 100644 --- a/test/e2e/instrumentation/logging/stackdriver/soak.go +++ b/test/e2e/instrumentation/logging/stackdriver/soak.go @@ -35,9 +35,6 @@ const ( // considered acceptable. Once per hour is fine for now, as long as it // doesn't loose too much logs. maxAllowedRestartsPerHour = 1.0 - // lastPodIngestionSlack is the amount of time to wait for the last pod's - // logs to be ingested by the logging agent. - lastPodIngestionSlack = 5 * time.Minute ) var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackdriver [Feature:StackdriverLogging] [Soak]", func() { diff --git a/test/e2e/node/kubelet_perf.go b/test/e2e/node/kubelet_perf.go index 9a57b13df33..49727096106 100644 --- a/test/e2e/node/kubelet_perf.go +++ b/test/e2e/node/kubelet_perf.go @@ -43,8 +43,6 @@ const ( monitoringTime = 20 * time.Minute // The periodic reporting period. reportingPeriod = 5 * time.Minute - // Timeout for waiting for the image prepulling to complete. - imagePrePullingLongTimeout = time.Minute * 8 ) type resourceTest struct { diff --git a/test/e2e/storage/volume_provisioning.go b/test/e2e/storage/volume_provisioning.go index 75ff8aa22c1..42a20959681 100644 --- a/test/e2e/storage/volume_provisioning.go +++ b/test/e2e/storage/volume_provisioning.go @@ -56,8 +56,6 @@ import ( const ( // Plugin name of the external provisioner externalPluginName = "example.com/nfs" - // Number of PVCs for multi PVC tests - multiPVCcount = 3 ) func checkZoneFromLabelAndAffinity(pv *v1.PersistentVolume, zone string, matchZone bool) { diff --git a/test/e2e/ui/dashboard.go b/test/e2e/ui/dashboard.go index 8d0bb085df0..40a38e5dd7e 100644 --- a/test/e2e/ui/dashboard.go +++ b/test/e2e/ui/dashboard.go @@ -42,7 +42,6 @@ var _ = SIGDescribe("Kubernetes Dashboard [Feature:Dashboard]", func() { uiServiceName = "kubernetes-dashboard" uiAppName = uiServiceName uiNamespace = metav1.NamespaceSystem - uiRedirect = "/ui" serverStartTimeout = 1 * time.Minute ) diff --git a/test/e2e_node/util.go b/test/e2e_node/util.go index 81bd1b17311..d1452bf47e8 100644 --- a/test/e2e_node/util.go +++ b/test/e2e_node/util.go @@ -64,7 +64,6 @@ var kubeletAddress = flag.String("kubelet-address", "http://127.0.0.1:10255", "H var startServices = flag.Bool("start-services", true, "If true, start local node services") var stopServices = flag.Bool("stop-services", true, "If true, stop local node services after running tests") var busyboxImage = imageutils.GetE2EImage(imageutils.BusyBox) -var perlImage = imageutils.GetE2EImage(imageutils.Perl) const ( // Kubelet internal cgroup name for node allocatable cgroup. diff --git a/test/integration/framework/util.go b/test/integration/framework/util.go index c947b6992de..e570e0db9a0 100644 --- a/test/integration/framework/util.go +++ b/test/integration/framework/util.go @@ -26,13 +26,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -const ( - // When these values are updated, also update cmd/kubelet/app/options/container_runtime.go - // A copy of these values exist in test/utils/image/manifest.go - currentPodInfraContainerImageName = "k8s.gcr.io/pause" - currentPodInfraContainerImageVersion = "3.1" -) - // CreateTestingNamespace creates a namespace for testing. func CreateTestingNamespace(baseName string, apiserver *httptest.Server, t *testing.T) *v1.Namespace { // TODO: Create a namespace with a given basename. diff --git a/test/integration/master/synthetic_master_test.go b/test/integration/master/synthetic_master_test.go index 259847c23f8..ab2a5692141 100644 --- a/test/integration/master/synthetic_master_test.go +++ b/test/integration/master/synthetic_master_test.go @@ -379,33 +379,6 @@ var hpaV1 = ` } ` -var deploymentExtensions = ` -{ - "apiVersion": "extensions/v1beta1", - "kind": "Deployment", - "metadata": { - "name": "test-deployment1", - "namespace": "default" - }, - "spec": { - "replicas": 1, - "template": { - "metadata": { - "labels": { - "app": "nginx0" - } - }, - "spec": { - "containers": [{ - "name": "nginx", - "image": "k8s.gcr.io/nginx:1.7.9" - }] - } - } - } -} -` - var deploymentApps = ` { "apiVersion": "apps/v1", diff --git a/test/integration/scheduler_perf/scheduler_test.go b/test/integration/scheduler_perf/scheduler_test.go index bc84ce73205..d895ead98b1 100644 --- a/test/integration/scheduler_perf/scheduler_test.go +++ b/test/integration/scheduler_perf/scheduler_test.go @@ -38,10 +38,8 @@ import ( ) const ( - warning3K = 100 - threshold3K = 30 - threshold30K = 30 - threshold60K = 30 + warning3K = 100 + threshold3K = 30 ) var (