Skip to content

Commit

Permalink
Fix some serverless typos (#36875)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrehilbert authored Oct 17, 2023
1 parent 4c34c41 commit b15f989
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libbeat/esleg/eslegclient/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (conn *Connection) getVersion() error {
}

if versionData.Version.BuildFlavor == "serverless" {
conn.log.Info("build flavor of es is severless, marking connection as serverless")
conn.log.Info("build flavor of es is serverless, marking connection as serverless")
conn.isServerless = true
} else if versionData.Version.BuildFlavor == "default" {
conn.isServerless = false
Expand Down
10 changes: 5 additions & 5 deletions libbeat/template/load_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func newTestSetup(t *testing.T, cfg TemplateConfig) *testSetup {
if err := client.Connect(); err != nil {
t.Fatal(err)
}
handler := &mockClientHandler{severless: false, mode: lifecycle.ILM}
handler := &mockClientHandler{serverless: false, mode: lifecycle.ILM}
loader, err := NewESLoader(client, handler)
require.NoError(t, err)
s := testSetup{t: t, client: client, loader: loader, config: cfg}
Expand All @@ -86,7 +86,7 @@ func newTestSetupWithESClient(t *testing.T, client ESClient, cfg TemplateConfig)
if cfg.Name == "" {
cfg.Name = fmt.Sprintf("load-test-%+v", rand.Int())
}
handler := &mockClientHandler{severless: false, mode: lifecycle.ILM}
handler := &mockClientHandler{serverless: false, mode: lifecycle.ILM}
loader, err := NewESLoader(client, handler)
require.NoError(t, err)
return &testSetup{t: t, client: client, loader: loader, config: cfg}
Expand Down Expand Up @@ -564,11 +564,11 @@ func getTestingElasticsearch(t eslegtest.TestLogger) *eslegclient.Connection {
}

type mockClientHandler struct {
severless bool
mode lifecycle.Mode
serverless bool
mode lifecycle.Mode
}

func (cli *mockClientHandler) IsServerless() bool { return cli.severless }
func (cli *mockClientHandler) IsServerless() bool { return cli.serverless }
func (cli *mockClientHandler) CheckEnabled() (bool, error) { return true, nil }
func (cli *mockClientHandler) Mode() lifecycle.Mode { return cli.mode }
func (cli *mockClientHandler) IsElasticsearch() bool { return true }
Expand Down
2 changes: 1 addition & 1 deletion libbeat/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func buildIdxSettings(ver version.V, userSettings mapstr.M, isServerless bool) m

// deal with settings that aren't available on serverless
if isServerless {
logp.L().Infof("remote instance is severless, number_of_shards and max_docvalue_fields_search will be skipped in index template")
logp.L().Infof("remote instance is serverless, number_of_shards and max_docvalue_fields_search will be skipped in index template")
userSettings.Delete("number_of_shards")
} else {
indexSettings.Put("max_docvalue_fields_search", defaultMaxDocvalueFieldsSearch)
Expand Down

0 comments on commit b15f989

Please sign in to comment.