diff --git a/inttest/common/bootloosesuite.go b/inttest/common/bootloosesuite.go index 9056c3a3aab0..000734fad967 100644 --- a/inttest/common/bootloosesuite.go +++ b/inttest/common/bootloosesuite.go @@ -817,15 +817,15 @@ func (s *BootlooseSuite) GetKubeConfig(node string, k0sKubeconfigArgs ...string) defer ssh.Disconnect() kubeConfigCmd := fmt.Sprintf("%s kubeconfig admin %s", s.K0sFullPath, strings.Join(k0sKubeconfigArgs, " ")) - kubeConf, err := ssh.ExecWithOutput(s.Context(), kubeConfigCmd) - if err != nil { + var kubeConf bytes.Buffer + if err := ssh.Exec(s.Context(), kubeConfigCmd, SSHStreams{Out: &kubeConf}); err != nil { return nil, err } - cfg, err := clientcmd.RESTConfigFromKubeConfig([]byte(kubeConf)) + cfg, err := clientcmd.RESTConfigFromKubeConfig(kubeConf.Bytes()) + s.Require().NoError(err) // The tests are querying the API server quite a lot, so we need to increase the QPS and Burst cfg.QPS = 40.0 cfg.Burst = 400.0 - s.Require().NoError(err) hostURL, err := url.Parse(cfg.Host) if err != nil { diff --git a/inttest/containerdimports/containerd_imports_test.go b/inttest/containerdimports/containerd_imports_test.go index 630d43983560..6265aa22ed74 100644 --- a/inttest/containerdimports/containerd_imports_test.go +++ b/inttest/containerdimports/containerd_imports_test.go @@ -38,17 +38,16 @@ func (s *ContainerdImportsSuite) TestK0sGetsUp() { s.Require().NoError(err) defer ssh.Disconnect() - s.NoError(s.InitController(0)) + s.Require().NoError(s.InitController(0)) - s.NoError(s.RunWorkers()) + s.Require().NoError(s.RunWorkers()) kc, err := s.KubeClient(s.ControllerNode(0)) if err != nil { s.FailNow("failed to obtain Kubernetes client", err) } - err = s.WaitForNodeReady(s.WorkerNode(0), kc) - s.NoError(err) + s.Require().NoError(s.WaitForNodeReady(s.WorkerNode(0), kc)) s.AssertSomeKubeSystemPods(kc)