Skip to content

Commit

Permalink
Bump allow duplicates version check to 7.11
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gr committed Oct 6, 2020
1 parent d1306da commit db83920
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions filebeat/fileset/modules_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func TestLoadPipeline(t *testing.T) {

content := map[string]interface{}{
"description": "describe pipeline",
"processors": []map[string]interface{}{
{
"processors": []interface{}{
map[string]interface{}{
"set": map[string]interface{}{
"field": "foo",
"value": "bar",
Expand Down
2 changes: 1 addition & 1 deletion filebeat/fileset/pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func modifySetProcessor(esVersion common.Version, pipelineID string, content map
// modifyAppendProcessor replaces allow_duplicates option with an if statement
// so ES less than 7.10 will still work
func modifyAppendProcessor(esVersion common.Version, pipelineID string, content map[string]interface{}) error {
flagVersion := common.MustNewVersion("7.10.0")
flagVersion := common.MustNewVersion("7.11.0")
if !esVersion.LessThan(flagVersion) {
return nil
}
Expand Down
16 changes: 8 additions & 8 deletions filebeat/fileset/pipelines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected bool
}{
{
name: "ES < 7.10.0: set to true",
name: "ES < 7.11.0: set to true",
esVersion: common.MustNewVersion("7.9.0"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -427,7 +427,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES < 7.10.0: set to false",
name: "ES < 7.11.0: set to false",
esVersion: common.MustNewVersion("7.9.0"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -453,8 +453,8 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES == 7.10.0",
esVersion: common.MustNewVersion("7.10.0"),
name: "ES == 7.11.0",
esVersion: common.MustNewVersion("7.11.0"),
content: map[string]interface{}{
"processors": []interface{}{
map[string]interface{}{
Expand All @@ -479,7 +479,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES > 7.10.0",
name: "ES > 7.11.0",
esVersion: common.MustNewVersion("8.0.0"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -505,7 +505,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES < 7.10.0: existing if",
name: "ES < 7.11.0: existing if",
esVersion: common.MustNewVersion("7.7.7"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -531,7 +531,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES < 7.10.0: existing if with contains",
name: "ES < 7.11.0: existing if with contains",
esVersion: common.MustNewVersion("7.7.7"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -557,7 +557,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES < 7.10.0: no value",
name: "ES < 7.11.0: no value",
esVersion: common.MustNewVersion("7.7.7"),
content: map[string]interface{}{
"processors": []interface{}{
Expand Down

0 comments on commit db83920

Please sign in to comment.