Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions cmd/testrunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,6 @@ func testRunnerSystemCommandAction(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
checkFailureStore, err := esClient.IsFailureStoreAvailable(ctx)
if err != nil {
return fmt.Errorf("can't check if failure store is available: %w", err)
}

if runTearDown || runTestsOnly {
if variantFlag != "" {
Expand Down Expand Up @@ -582,7 +578,6 @@ func testRunnerSystemCommandAction(cmd *cobra.Command, args []string) error {
GlobalTestConfig: globalTestConfig.System,
WithCoverage: testCoverage,
CoverageType: testCoverageFormat,
CheckFailureStore: checkFailureStore,
})

logger.Debugf("Running suite...")
Expand Down
26 changes: 0 additions & 26 deletions internal/elasticsearch/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,32 +220,6 @@ func (client *Client) Info(ctx context.Context) (*Info, error) {
return &info, nil
}

// IsFailureStoreAvailable checks if the failure store is available.
func (client *Client) IsFailureStoreAvailable(ctx context.Context) (bool, error) {
// FIXME: Using the low-level transport till the API SDK supports the failure store.
request, err := http.NewRequest(http.MethodGet, "/_search?failure_store=only", nil)
if err != nil {
return false, fmt.Errorf("failed to create search request: %w", err)
}
request.Header.Set("Content-Type", "application/json")

resp, err := client.Transport.Perform(request)
if err != nil {
return false, fmt.Errorf("failed to perform search request: %w", err)
}
defer resp.Body.Close()

switch resp.StatusCode {
case http.StatusOK:
return true, nil
case http.StatusBadRequest:
// Error expected when using an unrecognized parameter.
return false, nil
default:
return false, fmt.Errorf("unexpected status code received: %d", resp.StatusCode)
}
}

// redHealthCause tries to identify the cause of a cluster in red state. This could be
// also used as a replacement of CheckHealth, but keeping them separated because it uses
// internal undocumented APIs that might change.
Expand Down
79 changes: 0 additions & 79 deletions internal/elasticsearch/ingest/failurestorage.go

This file was deleted.

88 changes: 0 additions & 88 deletions internal/elasticsearch/ingest/failurestorage_test.go

This file was deleted.

Loading