diff --git a/pkg/testing/define/define.go b/pkg/testing/define/define.go index ec371467268..3d83b60267d 100644 --- a/pkg/testing/define/define.go +++ b/pkg/testing/define/define.go @@ -267,7 +267,7 @@ func getKibanaClient() (*kibana.Client, error) { Host: kibanaHost, Username: kibanaUser, Password: kibanaPass, - IgnoreVersion: true, + IgnoreVersion: false, }, 0, "Elastic-Agent-Test-Define", version.GetDefaultVersion(), version.Commit(), version.BuildTime().String()) if err != nil { return nil, fmt.Errorf("failed to create kibana client: %w", err) diff --git a/testing/integration/beats_serverless_test.go b/testing/integration/beats_serverless_test.go index c26dee97bb2..c8f875559cd 100644 --- a/testing/integration/beats_serverless_test.go +++ b/testing/integration/beats_serverless_test.go @@ -260,7 +260,9 @@ func (runner *BeatRunner) SubtestExportDashboards() { runner.T().Logf("got output: %s", exportOut) assert.NoError(runner.T(), err) - inFolder, err := os.ReadDir(filepath.Join(outDir, "/_meta/kibana/8/dashboard")) + // The folder matches the major version of Kibana, so we read it from the API + dashboardFolder := fmt.Sprintf("/_meta/kibana/%d/dashboard", runner.requirementsInfo.KibanaClient.GetVersion().Major) + inFolder, err := os.ReadDir(filepath.Join(outDir, dashboardFolder)) require.NoError(runner.T(), err) runner.T().Logf("got log contents: %#v", inFolder) require.NotEmpty(runner.T(), inFolder)