Skip to content

Commit 2a47049

Browse files
committed
bump kind
Signed-off-by: Peter Grant <[email protected]>
1 parent 1c88db1 commit 2a47049

File tree

2 files changed

+4
-59
lines changed

2 files changed

+4
-59
lines changed

kind-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ kind: Cluster
22
apiVersion: kind.x-k8s.io/v1alpha4
33
nodes:
44
- role: control-plane
5-
image: &kind_node_image kindest/node:v1.23.13
5+
image: &kind_node_image kindest/node:v1.26.0
66
- role: worker
77
image: *kind_node_image
88
- role: worker

test/integration/sonobuoy_integration_test.go

+3-58
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import (
88
"context"
99
"flag"
1010
"fmt"
11+
"github.com/kylelemons/godebug/pretty"
12+
"github.com/vmware-tanzu/sonobuoy/pkg/client/results"
13+
yaml "gopkg.in/yaml.v2"
1114
"os"
1215
"os/exec"
1316
"path/filepath"
@@ -16,10 +19,6 @@ import (
1619
"strings"
1720
"testing"
1821
"time"
19-
20-
"github.com/kylelemons/godebug/pretty"
21-
"github.com/vmware-tanzu/sonobuoy/pkg/client/results"
22-
yaml "gopkg.in/yaml.v2"
2322
)
2423

2524
const (
@@ -375,60 +374,6 @@ func TestQuick(t *testing.T) {
375374
})
376375
}
377376

378-
// TestQuickLegacyFix runs a real "--mode quick" check against the cluster with the yaml from v0.54.0
379-
// which suffered from issues with agreement regarding ResultsDir.
380-
func TestQuickLegacyFix(t *testing.T) {
381-
t.Parallel()
382-
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
383-
defer cancel()
384-
385-
// Hardcoded namespace due to nature of test being from a file.
386-
ns, cleanup := getNamespace(t)
387-
// Doing a deletion check here rather than as a separate test so-as not to waste the extra compute time.
388-
defer func(t *testing.T, ns string) {
389-
if err := deleteComplete(t, ns); err != nil {
390-
t.Fatalf("Failed to completely delete resources: %v", err)
391-
}
392-
}(t, ns)
393-
defer cleanup(true)
394-
395-
// Get and modify data so it targets the right sonobuoy image and namespace.
396-
runData, err := os.ReadFile("./testdata/issue1688.yaml")
397-
if err != nil {
398-
t.Fatalf("Failed to read run data file: %v", err)
399-
}
400-
401-
tmpfile, err := os.CreateTemp("", "")
402-
if err != nil {
403-
t.Fatalf("Failed to create necessary tmpfile: %v", err)
404-
}
405-
406-
curVersion := mustRunSonobuoyCommandWithContext(context.Background(), t, ns, "version --short")
407-
imgName := strings.TrimSpace(fmt.Sprintf("sonobuoy/sonobuoy:%v", curVersion.String()))
408-
runData = bytes.ReplaceAll(runData, []byte("REPLACE_NS"), []byte(ns))
409-
runData = bytes.ReplaceAll(runData, []byte("REPLACE_IMAGE"), []byte(imgName))
410-
411-
if _, err := tmpfile.Write(runData); err != nil {
412-
t.Fatalf("Failed to rewrite test data as needed for 1688 test: %v", err)
413-
}
414-
if err := tmpfile.Close(); err != nil {
415-
t.Fatalf("Failed to close tmpfile: %v", err)
416-
}
417-
418-
// Use kubectl to apply the run so that we don't have the CLI modifying the data.
419-
args := fmt.Sprintf("apply -f %v", tmpfile.Name())
420-
if out, err := runCommandWithContext(context.TODO(), t, kubectl, args); err != nil {
421-
t.Fatalf("Failed to launch run for 1688: %v %v", err, out.String())
422-
}
423-
424-
// Now we can use sonobuoy to wait for results.
425-
mustRunSonobuoyCommandWithContext(ctx, t, ns, fmt.Sprintf("wait -n %v", ns))
426-
427-
checkStatusForPluginErrors(ctx, t, ns, "e2ecustom", 0)
428-
tb := mustDownloadTarball(ctx, t, ns)
429-
tb = saveToArtifacts(t, tb)
430-
}
431-
432377
// deleteComplete is the logic that checks that we deleted the namespace and our clusterRole[Bindings]
433378
func deleteComplete(t *testing.T, ns string) error {
434379
out, err := runCommandWithContext(context.TODO(), t, kubectl, fmt.Sprintf("get clusterroles sonobuoy-serviceaccount-%v -o yaml", ns))

0 commit comments

Comments
 (0)