Skip to content

Commit

Permalink
tinkering with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fearful-symmetry committed Sep 22, 2023
1 parent a50419d commit 5d99ee0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libbeat/idxmgmt/lifecycle/ilm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func runEnsurePolicyTest(t *testing.T, testPolicy Policy, cfg LifecycleConfig) {
calls: []onCall{
onCheckExists().Return(true),
onHasPolicy().Return(false, nil),
onCreatePolicyFromConfig().Return(errOf(ErrRequestFailed)),
onCreatePolicyFromConfig().Return(ErrRequestFailed),
},
fail: ErrRequestFailed,
cfg: cfg,
Expand Down
5 changes: 4 additions & 1 deletion libbeat/tests/integration/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,17 @@ setup.template:

// Test that beat stops in case elasticsearch index is modified and name not
func TestIndexModifiedNoName(t *testing.T) {
cfg := `
cfgRaw := `
mockbeat:
output:
elasticsearch:
hosts: %s
index: test
setup.template:
pattern: test
`
esUrl := GetESURL(t, "http")
cfg := fmt.Sprintf(cfgRaw, esUrl.String())
mockbeat := NewBeat(t, "mockbeat", "../../libbeat.test")
mockbeat.WriteConfigFile(cfg)
mockbeat.Start()
Expand Down

0 comments on commit 5d99ee0

Please sign in to comment.