mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #97295 from tiloso/staticcheck-test-integration
Fix staticcheck in test/integration/{examples,framework}
This commit is contained in:
commit
101cdbf932
@ -2,8 +2,6 @@ cluster/images/etcd/migrate
|
||||
pkg/controller/replicaset
|
||||
pkg/kubelet/dockershim
|
||||
test/e2e/autoscaling
|
||||
test/integration/examples
|
||||
test/integration/framework
|
||||
test/integration/garbagecollector
|
||||
test/integration/scheduler_perf
|
||||
vendor/k8s.io/apimachinery/pkg/api/apitesting/roundtrip
|
||||
|
@ -90,7 +90,7 @@ func TestAggregatedAPIServer(t *testing.T) {
|
||||
"--kubeconfig", wardleToKASKubeConfigFile,
|
||||
})
|
||||
if err := wardleCmd.Execute(); err != nil {
|
||||
t.Fatal(err)
|
||||
t.Error(err)
|
||||
}
|
||||
}()
|
||||
directWardleClientConfig, err := waitForWardleRunning(t, kubeClientConfig, wardleCertDir, wardlePort)
|
||||
@ -131,7 +131,7 @@ func TestAggregatedAPIServer(t *testing.T) {
|
||||
|
||||
// wait for the unavailable API service to be processed with updated status
|
||||
err = wait.Poll(100*time.Millisecond, 5*time.Second, func() (done bool, err error) {
|
||||
_, err = kubeClient.Discovery().ServerResources()
|
||||
_, _, err = kubeClient.Discovery().ServerGroupsAndResources()
|
||||
hasExpectedError := checkWardleUnavailableDiscoveryError(t, err)
|
||||
return hasExpectedError, nil
|
||||
})
|
||||
|
@ -100,7 +100,7 @@ func RunCustomEtcd(dataDir string, customFlags []string) (url string, stopFn fun
|
||||
// TODO: Check for valid etcd version.
|
||||
etcdPath, err := getEtcdPath()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, installEtcd)
|
||||
fmt.Fprint(os.Stderr, installEtcd)
|
||||
return "", nil, fmt.Errorf("could not find etcd in PATH: %v", err)
|
||||
}
|
||||
etcdPort, err := getAvailablePort()
|
||||
|
@ -127,7 +127,7 @@ func StartTestServer(t *testing.T, stopCh <-chan struct{}, setup TestServerSetup
|
||||
}
|
||||
go func() {
|
||||
if err := kubeAPIServer.GenericAPIServer.PrepareRun().Run(stopCh); err != nil {
|
||||
t.Fatal(err)
|
||||
t.Error(err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user