From 1b34f714c447f90f446e977066502392d9a0b02d Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 10 Mar 2020 19:08:02 +0100 Subject: [PATCH 01/12] Add tags for aws tests --- .../module/aws/billing/billing_integration_test.go | 6 ++---- .../aws/cloudwatch/cloudwatch_integration_test.go | 11 +++-------- .../module/aws/dynamodb/dynamodb_integration_test.go | 6 ++---- .../metricbeat/module/aws/ebs/ebs_integration_test.go | 6 ++---- .../metricbeat/module/aws/ec2/ec2_integration_test.go | 11 +++-------- .../metricbeat/module/aws/elb/elb_integration_test.go | 6 ++---- .../module/aws/lambda/lambda_integration_test.go | 6 ++---- x-pack/metricbeat/module/aws/mtest/integration.go | 10 +++++++--- .../metricbeat/module/aws/rds/rds_integration_test.go | 11 +++-------- .../s3_daily_storage_integration_test.go | 11 +++-------- .../aws/s3_request/s3_request_integration_test.go | 11 +++-------- .../metricbeat/module/aws/sns/sns_integration_test.go | 6 ++---- .../metricbeat/module/aws/sqs/sqs_integration_test.go | 11 +++-------- .../module/aws/usage/usage_integration_test.go | 6 ++---- .../metricbeat/module/aws/vpc/vpc_integration_test.go | 6 ++---- 15 files changed, 41 insertions(+), 83 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 fe8fa31fd87..3d8cbff0598 100644 --- a/x-pack/metricbeat/module/aws/billing/billing_integration_test.go +++ b/x-pack/metricbeat/module/aws/billing/billing_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package billing @@ -14,10 +15,7 @@ import ( ) func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("billing", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "billing", "300s") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") 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 09cdde83a4f..c99c6acb40c 100644 --- a/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go +++ b/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package cloudwatch @@ -16,10 +17,7 @@ import ( ) func TestFetch(t *testing.T) { - config, info := mtest.GetConfigForTest("cloudwatch", "300s") - if info != "" { - t.Skip("Skipping TestFetch: " + info) - } + config := mtest.GetConfigForTest(t, "cloudwatch", "300s") config = addCloudwatchMetricsToConfig(config) metricSet := mbtest.NewReportingMetricSetV2Error(t, config) @@ -32,10 +30,7 @@ func TestFetch(t *testing.T) { } func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("cloudwatch", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "cloudwatch", "300s") config = addCloudwatchMetricsToConfig(config) metricSet := mbtest.NewFetcher(t, config) diff --git a/x-pack/metricbeat/module/aws/dynamodb/dynamodb_integration_test.go b/x-pack/metricbeat/module/aws/dynamodb/dynamodb_integration_test.go index 48e7f501e0f..52a97184650 100644 --- a/x-pack/metricbeat/module/aws/dynamodb/dynamodb_integration_test.go +++ b/x-pack/metricbeat/module/aws/dynamodb/dynamodb_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package dynamodb @@ -14,10 +15,7 @@ import ( ) func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("dynamodb", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "dynamodb", "300s") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") diff --git a/x-pack/metricbeat/module/aws/ebs/ebs_integration_test.go b/x-pack/metricbeat/module/aws/ebs/ebs_integration_test.go index d2cec8d0ab9..4012a8c0060 100644 --- a/x-pack/metricbeat/module/aws/ebs/ebs_integration_test.go +++ b/x-pack/metricbeat/module/aws/ebs/ebs_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package ebs @@ -14,10 +15,7 @@ import ( ) func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("ebs", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "ebs", "300s") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") 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 1e745b52107..baaf6e563e1 100644 --- a/x-pack/metricbeat/module/aws/ec2/ec2_integration_test.go +++ b/x-pack/metricbeat/module/aws/ec2/ec2_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package ec2 @@ -16,10 +17,7 @@ import ( ) func TestFetch(t *testing.T) { - config, info := mtest.GetConfigForTest("ec2", "300s") - if info != "" { - t.Skip("Skipping TestFetch: " + info) - } + config := mtest.GetConfigForTest(t, "ec2", "300s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) @@ -66,10 +64,7 @@ func TestFetch(t *testing.T) { } func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("ec2", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "ec2", "300s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) if err := mbtest.WriteEventsReporterV2Error(metricSet, t, "/"); err != nil { diff --git a/x-pack/metricbeat/module/aws/elb/elb_integration_test.go b/x-pack/metricbeat/module/aws/elb/elb_integration_test.go index 254dc822ee0..6fc05f5a0e1 100644 --- a/x-pack/metricbeat/module/aws/elb/elb_integration_test.go +++ b/x-pack/metricbeat/module/aws/elb/elb_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package elb @@ -32,10 +33,7 @@ func TestData(t *testing.T) { {"AWS/NetworkELB", "./_meta/data_nlb.json"}, } - config, info := mtest.GetConfigForTest("elb", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "elb", "300s") for _, df := range dataFiles { metricSet := mbtest.NewFetcher(t, config) diff --git a/x-pack/metricbeat/module/aws/lambda/lambda_integration_test.go b/x-pack/metricbeat/module/aws/lambda/lambda_integration_test.go index 4382ef36e0e..6948f93515e 100644 --- a/x-pack/metricbeat/module/aws/lambda/lambda_integration_test.go +++ b/x-pack/metricbeat/module/aws/lambda/lambda_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package lambda @@ -14,10 +15,7 @@ import ( ) func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("lambda", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "lambda", "300s") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") diff --git a/x-pack/metricbeat/module/aws/mtest/integration.go b/x-pack/metricbeat/module/aws/mtest/integration.go index 417f3b60096..06366eafa05 100644 --- a/x-pack/metricbeat/module/aws/mtest/integration.go +++ b/x-pack/metricbeat/module/aws/mtest/integration.go @@ -15,7 +15,9 @@ import ( ) // GetConfigForTest function gets aws credentials for integration tests. -func GetConfigForTest(metricSetName string, period string) (map[string]interface{}, string) { +func GetConfigForTest(t *testing.T, metricSetName string, period string) (map[string]interface{}, string) { + t.Helper() + accessKeyID, okAccessKeyID := os.LookupEnv("AWS_ACCESS_KEY_ID") secretAccessKey, okSecretAccessKey := os.LookupEnv("AWS_SECRET_ACCESS_KEY") sessionToken, okSessionToken := os.LookupEnv("AWS_SESSION_TOKEN") @@ -27,9 +29,9 @@ func GetConfigForTest(metricSetName string, period string) (map[string]interface info := "" config := map[string]interface{}{} if !okAccessKeyID || accessKeyID == "" { - info = "Skipping TestFetch; $AWS_ACCESS_KEY_ID not set or set to empty" + t.Fatal("$AWS_ACCESS_KEY_ID not set or set to empty") } else if !okSecretAccessKey || secretAccessKey == "" { - info = "Skipping TestFetch; $AWS_SECRET_ACCESS_KEY not set or set to empty" + t.Fatal("$AWS_SECRET_ACCESS_KEY not set or set to empty") } else { config = map[string]interface{}{ "module": "aws", @@ -51,6 +53,8 @@ func GetConfigForTest(metricSetName string, period string) (map[string]interface // CheckEventField function checks a given field type and compares it with the expected type for integration tests. func CheckEventField(metricName string, expectedType string, event mb.Event, t *testing.T) { + t.Helper() + ok1, err1 := event.MetricSetFields.HasKey(metricName) ok2, err2 := event.RootFields.HasKey(metricName) if ok1 || ok2 { 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 4d8a45812e3..0be93854039 100644 --- a/x-pack/metricbeat/module/aws/rds/rds_integration_test.go +++ b/x-pack/metricbeat/module/aws/rds/rds_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package rds @@ -16,10 +17,7 @@ import ( ) func TestFetch(t *testing.T) { - config, info := mtest.GetConfigForTest("rds", "60s") - if info != "" { - t.Skip("Skipping TestFetch: " + info) - } + config := mtest.GetConfigForTest(t, "rds", "60s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) @@ -49,10 +47,7 @@ func TestFetch(t *testing.T) { } func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("rds", "60s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "rds", "60s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) if err := mbtest.WriteEventsReporterV2Error(metricSet, t, "/"); err != nil { 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 2c27f317cd8..592416a56a8 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 @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package s3_daily_storage @@ -16,10 +17,7 @@ import ( ) func TestFetch(t *testing.T) { - config, info := mtest.GetConfigForTest("s3_daily_storage", "86400s") - if info != "" { - t.Skip("Skipping TestFetch: " + info) - } + config := mtest.GetConfigForTest(t, "s3_daily_storage", "86400s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) @@ -42,10 +40,7 @@ func TestFetch(t *testing.T) { } func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("s3_daily_storage", "86400s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "s3_daily_storage", "86400s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) if err := mbtest.WriteEventsReporterV2Error(metricSet, t, "/"); err != nil { 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 0892e6a7f71..eeae8439f1f 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 @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package s3_request @@ -16,10 +17,7 @@ import ( ) func TestFetch(t *testing.T) { - config, info := mtest.GetConfigForTest("s3_request", "86400s") - if info != "" { - t.Skip("Skipping TestFetch: " + info) - } + config := mtest.GetConfigForTest(t, "s3_request", "86400s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) @@ -56,10 +54,7 @@ func TestFetch(t *testing.T) { } func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("s3_request", "86400s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "s3_request", "86400s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) if err := mbtest.WriteEventsReporterV2Error(metricSet, t, "/"); err != nil { diff --git a/x-pack/metricbeat/module/aws/sns/sns_integration_test.go b/x-pack/metricbeat/module/aws/sns/sns_integration_test.go index 82438ae8040..b00d1a6b708 100644 --- a/x-pack/metricbeat/module/aws/sns/sns_integration_test.go +++ b/x-pack/metricbeat/module/aws/sns/sns_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package sns @@ -14,10 +15,7 @@ import ( ) func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("sns", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "sns", "300s") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") 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 eeeb9d979fa..3f1eddb9faa 100644 --- a/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go +++ b/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package sqs @@ -17,10 +18,7 @@ import ( ) func TestFetch(t *testing.T) { - config, info := mtest.GetConfigForTest("sqs", "300s") - if info != "" { - t.Skip("Skipping TestFetch: " + info) - } + config := mtest.GetConfigForTest(t, "sqs", "300s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) @@ -49,10 +47,7 @@ func TestFetch(t *testing.T) { } func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("sqs", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "sqs", "300s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) if err := mbtest.WriteEventsReporterV2Error(metricSet, t, "/"); err != nil { diff --git a/x-pack/metricbeat/module/aws/usage/usage_integration_test.go b/x-pack/metricbeat/module/aws/usage/usage_integration_test.go index 60d2437743f..f7f63e6ff4d 100644 --- a/x-pack/metricbeat/module/aws/usage/usage_integration_test.go +++ b/x-pack/metricbeat/module/aws/usage/usage_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package usage @@ -14,10 +15,7 @@ import ( ) func TestData(t *testing.T) { - config, info := mtest.GetConfigForTest("usage", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "usage", "300s") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") diff --git a/x-pack/metricbeat/module/aws/vpc/vpc_integration_test.go b/x-pack/metricbeat/module/aws/vpc/vpc_integration_test.go index f19007fa369..a7e7db66df4 100644 --- a/x-pack/metricbeat/module/aws/vpc/vpc_integration_test.go +++ b/x-pack/metricbeat/module/aws/vpc/vpc_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build aws package vpc @@ -32,10 +33,7 @@ func TestData(t *testing.T) { {"AWS/TransitGateway", "./_meta/data_transit_gateway.json"}, } - config, info := mtest.GetConfigForTest("vpc", "300s") - if info != "" { - t.Skip("Skipping TestData: " + info) - } + config := mtest.GetConfigForTest(t, "vpc", "300s") for _, df := range dataFiles { metricSet := mbtest.NewFetcher(t, config) From 9e59f89e3bcc30a60f3a47dcceced2cc9fabae45 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 10 Mar 2020 19:16:15 +0100 Subject: [PATCH 02/12] Add tags for azure tests --- .../azure/compute_vm/compute_vm_integration_test.go | 11 +++-------- .../compute_vm_scaleset_integration_test.go | 11 +++-------- .../container_instance_integration_test.go | 11 +++-------- .../container_registry_integration_test.go | 11 +++-------- .../container_service_integration_test.go | 11 +++-------- .../database_account_integration_test.go | 11 +++-------- .../azure/monitor/monitor_integration_test.go | 11 +++-------- .../azure/storage/storage_integration_test.go | 11 +++-------- x-pack/metricbeat/module/azure/test/integration.go | 13 ++++++++----- 9 files changed, 32 insertions(+), 69 deletions(-) diff --git a/x-pack/metricbeat/module/azure/compute_vm/compute_vm_integration_test.go b/x-pack/metricbeat/module/azure/compute_vm/compute_vm_integration_test.go index 04319405207..f5f988d41f3 100644 --- a/x-pack/metricbeat/module/azure/compute_vm/compute_vm_integration_test.go +++ b/x-pack/metricbeat/module/azure/compute_vm/compute_vm_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package compute_vm @@ -17,10 +18,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config, err := test.GetConfig("compute_vm") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "compute_vm") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) if len(errs) > 0 { @@ -30,10 +28,7 @@ func TestFetchMetricset(t *testing.T) { } func TestData(t *testing.T) { - config, err := test.GetConfig("compute_vm") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "compute_vm") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") } diff --git a/x-pack/metricbeat/module/azure/compute_vm_scaleset/compute_vm_scaleset_integration_test.go b/x-pack/metricbeat/module/azure/compute_vm_scaleset/compute_vm_scaleset_integration_test.go index acd6450a97b..b48d7a65c5f 100644 --- a/x-pack/metricbeat/module/azure/compute_vm_scaleset/compute_vm_scaleset_integration_test.go +++ b/x-pack/metricbeat/module/azure/compute_vm_scaleset/compute_vm_scaleset_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package compute_vm_scaleset @@ -17,10 +18,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config, err := test.GetConfig("compute_vm_scaleset") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "compute_vm_scaleset") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) if len(errs) > 0 { @@ -30,10 +28,7 @@ func TestFetchMetricset(t *testing.T) { } func TestData(t *testing.T) { - config, err := test.GetConfig("compute_vm_scaleset") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "compute_vm_scaleset") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") } diff --git a/x-pack/metricbeat/module/azure/container_instance/container_instance_integration_test.go b/x-pack/metricbeat/module/azure/container_instance/container_instance_integration_test.go index 7d251e93396..4808c3fde5d 100644 --- a/x-pack/metricbeat/module/azure/container_instance/container_instance_integration_test.go +++ b/x-pack/metricbeat/module/azure/container_instance/container_instance_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package container_instance @@ -20,10 +21,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config, err := test.GetConfig("container_instance") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "container_instance") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) if len(errs) > 0 { @@ -33,10 +31,7 @@ func TestFetchMetricset(t *testing.T) { } func TestData(t *testing.T) { - config, err := test.GetConfig("container_instance") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "container_instance") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") } diff --git a/x-pack/metricbeat/module/azure/container_registry/container_registry_integration_test.go b/x-pack/metricbeat/module/azure/container_registry/container_registry_integration_test.go index 53fce487a7a..3f6fceb64d7 100644 --- a/x-pack/metricbeat/module/azure/container_registry/container_registry_integration_test.go +++ b/x-pack/metricbeat/module/azure/container_registry/container_registry_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package container_registry @@ -20,10 +21,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config, err := test.GetConfig("container_registry") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "container_registry") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) if len(errs) > 0 { @@ -33,10 +31,7 @@ func TestFetchMetricset(t *testing.T) { } func TestData(t *testing.T) { - config, err := test.GetConfig("container_registry") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "container_registry") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") } diff --git a/x-pack/metricbeat/module/azure/container_service/container_service_integration_test.go b/x-pack/metricbeat/module/azure/container_service/container_service_integration_test.go index 93acb39da51..dfb1017c74f 100644 --- a/x-pack/metricbeat/module/azure/container_service/container_service_integration_test.go +++ b/x-pack/metricbeat/module/azure/container_service/container_service_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package container_service @@ -20,10 +21,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config, err := test.GetConfig("container_service") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "container_service") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) if len(errs) > 0 { @@ -33,10 +31,7 @@ func TestFetchMetricset(t *testing.T) { } func TestData(t *testing.T) { - config, err := test.GetConfig("container_service") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "container_service") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") } diff --git a/x-pack/metricbeat/module/azure/database_account/database_account_integration_test.go b/x-pack/metricbeat/module/azure/database_account/database_account_integration_test.go index 8099e729687..0ec41fdd8a4 100644 --- a/x-pack/metricbeat/module/azure/database_account/database_account_integration_test.go +++ b/x-pack/metricbeat/module/azure/database_account/database_account_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package database_account @@ -17,10 +18,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config, err := test.GetConfig("database_account") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "database_account") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) if len(errs) > 0 { @@ -30,10 +28,7 @@ func TestFetchMetricset(t *testing.T) { } func TestData(t *testing.T) { - config, err := test.GetConfig("database_account") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "database_account") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") } diff --git a/x-pack/metricbeat/module/azure/monitor/monitor_integration_test.go b/x-pack/metricbeat/module/azure/monitor/monitor_integration_test.go index 87de0e38bce..f37a87f18c8 100644 --- a/x-pack/metricbeat/module/azure/monitor/monitor_integration_test.go +++ b/x-pack/metricbeat/module/azure/monitor/monitor_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package monitor @@ -17,10 +18,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config, err := test.GetConfig("monitor") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "monitor") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) if len(errs) > 0 { @@ -30,10 +28,7 @@ func TestFetchMetricset(t *testing.T) { } func TestData(t *testing.T) { - config, err := test.GetConfig("monitor") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "monitor") config["resources"] = []map[string]interface{}{{ "resource_query": "resourceType eq 'Microsoft.DocumentDb/databaseAccounts'", "metrics": []map[string]interface{}{{"namespace": "Microsoft.DocumentDb/databaseAccounts", diff --git a/x-pack/metricbeat/module/azure/storage/storage_integration_test.go b/x-pack/metricbeat/module/azure/storage/storage_integration_test.go index 920f21393c1..f3a3f906173 100644 --- a/x-pack/metricbeat/module/azure/storage/storage_integration_test.go +++ b/x-pack/metricbeat/module/azure/storage/storage_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package storage @@ -17,10 +18,7 @@ import ( ) func TestFetchMetricset(t *testing.T) { - config, err := test.GetConfig("storage") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "storage") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) events, errs := mbtest.ReportingFetchV2Error(metricSet) if len(errs) > 0 { @@ -30,10 +28,7 @@ func TestFetchMetricset(t *testing.T) { } func TestData(t *testing.T) { - config, err := test.GetConfig("storage") - if err != nil { - t.Skip("Skipping TestFetch: " + err.Error()) - } + config := test.GetConfig(t, "storage") metricSet := mbtest.NewFetcher(t, config) metricSet.WriteEvents(t, "/") } diff --git a/x-pack/metricbeat/module/azure/test/integration.go b/x-pack/metricbeat/module/azure/test/integration.go index 9e8e011a217..ed6326ebfb6 100644 --- a/x-pack/metricbeat/module/azure/test/integration.go +++ b/x-pack/metricbeat/module/azure/test/integration.go @@ -7,25 +7,28 @@ package test import ( "errors" "os" + "testing" ) // GetConfig function gets azure credentials for integration tests. -func GetConfig(metricSetName string) (map[string]interface{}, error) { +func GetConfig(t *testing.T, metricSetName string) map[string]interface{} { + t.Helper() + clientId, ok := os.LookupEnv("AZURE_CLIENT_ID") if !ok { - return nil, errors.New("could not find var AZURE_CLIENT_ID") + t.Fatal("Could not find var AZURE_CLIENT_ID") } clientSecret, ok := os.LookupEnv("AZURE_CLIENT_SECRET") if !ok { - return nil, errors.New("could not find var AZURE_CLIENT_SECRET") + t.Fatal("Could not find var AZURE_CLIENT_SECRET") } tenantId, ok := os.LookupEnv("AZURE_TENANT_ID") if !ok { - return nil, errors.New("could not find var AZURE_TENANT_ID") + t.Fatal("Could not find var AZURE_TENANT_ID") } subId, ok := os.LookupEnv("AZURE_SUBSCRIPTION_ID") if !ok { - return nil, errors.New("could not find var AZURE_SUBSCRIPTION_ID") + t.Fatal("Could not find var AZURE_SUBSCRIPTION_ID") } return map[string]interface{}{ "module": "azure", From a4f9d21ca4c09d6417c5698ec752b65d4080ad2f Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 10 Mar 2020 19:29:32 +0100 Subject: [PATCH 03/12] Add tags for azure tests in filebeat --- .../azureeventhub_integration_test.go | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go b/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go index 9d65ff80104..e14bb41a918 100644 --- a/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go +++ b/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go @@ -3,6 +3,7 @@ // you may not use this file except in compliance with the Elastic License. // +build integration +// +build azure package azureeventhub @@ -23,26 +24,20 @@ import ( ) var ( - - // setup the input config azureConfig = common.MustNewConfigFrom(common.MapStr{ - "storage_account_key": os.Getenv("STORAGE_ACCOUNT_NAME"), - "storage_account": os.Getenv("STORAGE_ACCOUNT_KEY"), + "storage_account_key": lookupEnv("STORAGE_ACCOUNT_NAME"), + "storage_account": lookupEnv("STORAGE_ACCOUNT_KEY"), "storage_account_container": ephContainerName, - "connection_string": os.Getenv("EVENTHUB_CONNECTION_STRING"), - "consumer_group": os.Getenv("EVENTHUB_CONSUMERGROUP"), - "eventhub": os.Getenv("EVENTHUB_NAME"), + "connection_string": lookupEnv("EVENTHUB_CONNECTION_STRING"), + "consumer_group": lookupEnv("EVENTHUB_CONSUMERGROUP"), + "eventhub": lookupEnv("EVENTHUB_NAME"), }) message = "{\"records\":[{\"some_field\":\"this is some message\",\"time\":\"2019-12-17T13:43:44.4946995Z\"}" ) func TestInput(t *testing.T) { - if os.Getenv("EVENTHUB_NAME") == "" || os.Getenv("EVENTHUB_CONNECTION_STRING") == "" { - t.Skip("EVENTHUB_NAME or/and EVENTHUB_CONSUMERGROUP are not set in environment.") - } - err := addEventToHub(os.Getenv("EVENTHUB_CONNECTION_STRING")) - + err := addEventToHub(lookupEnv("EVENTHUB_CONNECTION_STRING")) if err != nil { t.Fatal(err) } @@ -99,6 +94,14 @@ func TestInput(t *testing.T) { } } +func lookupEnv(t *testing.T, varName string) string { + value, ok := os.LookupEnv(varName) + if !ok { + t.Fatalf("Environment variable %s is not set", varName) + } + return value +} + func addEventToHub(connStr string) error { hub, err := eventhub.NewHubFromConnectionString(connStr) if err != nil { From 6d73ba98c9f80f5145edaa0009f21268273c1063 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 10 Mar 2020 19:37:20 +0100 Subject: [PATCH 04/12] Add tags for S3 tests in filebeat --- .../filebeat/input/s3/s3_integration_test.go | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/x-pack/filebeat/input/s3/s3_integration_test.go b/x-pack/filebeat/input/s3/s3_integration_test.go index 7dcd3c241fd..af972f85fa8 100644 --- a/x-pack/filebeat/input/s3/s3_integration_test.go +++ b/x-pack/filebeat/input/s3/s3_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 s3 import ( @@ -38,7 +41,9 @@ const ( var filePath = filepath.Join("ftest", fileName) // GetConfigForTest function gets aws credentials for integration tests. -func getConfigForTest() (config, string) { +func getConfigForTest(t *testing.T) config { + t.Helper() + awsConfig := awscommon.ConfigAWS{} queueURL := os.Getenv("QUEUE_URL") profileName := os.Getenv("AWS_PROFILE_NAME") @@ -51,25 +56,25 @@ func getConfigForTest() (config, string) { } switch { case queueURL == "": - return config, "Skipping: $QUEUE_URL is not set in environment" + t.Fatal("$QUEUE_URL is not set in environment") case profileName == "" && accessKeyID == "": - return config, "Skipping: $AWS_ACCESS_KEY_ID or $AWS_PROFILE_NAME not set or set to empty" + t.Fatal("$AWS_ACCESS_KEY_ID or $AWS_PROFILE_NAME not set or set to empty") case profileName != "": awsConfig.ProfileName = profileName config.QueueURL = queueURL config.AwsConfig = awsConfig - return config, "" + return config case secretAccessKey == "": - return config, "Skipping: $AWS_SECRET_ACCESS_KEY not set or set to empty" - default: - awsConfig.AccessKeyID = accessKeyID - awsConfig.SecretAccessKey = secretAccessKey - if sessionToken != "" { - awsConfig.SessionToken = sessionToken - } - config.AwsConfig = awsConfig - return config, "" + t.Fatal("$AWS_SECRET_ACCESS_KEY not set or set to empty") } + + awsConfig.AccessKeyID = accessKeyID + awsConfig.SecretAccessKey = secretAccessKey + if sessionToken != "" { + awsConfig.SessionToken = sessionToken + } + config.AwsConfig = awsConfig + return config } func uploadSampleLogFile(t *testing.T, bucketName string, svcS3 s3iface.ClientAPI) { @@ -160,7 +165,7 @@ func runTest(t *testing.T, cfg *common.Config, run func(t *testing.T, input *s3I in, err := NewInput(cfg, connector, inputCtx) if err != nil { - t.Skipf("Skipping: %v", err) + t.Fatalf("Skipping: %v", err) } s3Input := in.(*s3Input) defer s3Input.Stop() @@ -224,13 +229,9 @@ func (o *stubOutleter) OnEvent(event beat.Event) bool { func TestS3Input(t *testing.T) { inputConfig := defaultTestConfig() + config := getConfigForTest(t) runTest(t, inputConfig, func(t *testing.T, input *s3Input, out *stubOutleter) { - config, info := getConfigForTest() - if info != "" { - t.Skipf("failed to get config for test: %v", info) - } - awsConfig, err := awscommon.GetAWSCredentials(config.AwsConfig) if err != nil { From d2691b8f22138062f29882c6c9419b87d6d8b632 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 10 Mar 2020 19:49:35 +0100 Subject: [PATCH 05/12] Allow to add extra tags from environment --- dev-tools/mage/gotest.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev-tools/mage/gotest.go b/dev-tools/mage/gotest.go index 2c8dd1cd2b7..f75b2211a1d 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -67,6 +67,7 @@ func makeGoTestArgs(name string) GoTestArgs { Packages: []string{"./..."}, OutputFile: fileName + ".out", JUnitReportFile: fileName + ".xml", + Tags: testTagsFromEnv(), } if TestCoverage { params.CoverageProfileFile = fileName + ".cov" @@ -83,6 +84,7 @@ func makeGoTestArgsForModule(name, module string) GoTestArgs { Packages: []string{fmt.Sprintf("./module/%s/...", module)}, OutputFile: fileName + ".out", JUnitReportFile: fileName + ".xml", + Tags: testTagsFromEnv(), } if TestCoverage { params.CoverageProfileFile = fileName + ".cov" @@ -90,6 +92,10 @@ func makeGoTestArgsForModule(name, module string) GoTestArgs { return params } +func testTagsFromEnv() []string { + return strings.Split(strings.Trim(os.Getenv("TEST_TAGS"), ", "), ",") +} + // DefaultGoTestUnitArgs returns a default set of arguments for running // all unit tests. We tag unit test files with '!integration'. func DefaultGoTestUnitArgs() GoTestArgs { return makeGoTestArgs("Unit") } From 59309846f51fdb003fb1da922d59f5ee90fbe04d Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 10 Mar 2020 20:12:00 +0100 Subject: [PATCH 06/12] Remove skip message --- x-pack/filebeat/input/s3/s3_integration_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/filebeat/input/s3/s3_integration_test.go b/x-pack/filebeat/input/s3/s3_integration_test.go index af972f85fa8..1d6a400a7f1 100644 --- a/x-pack/filebeat/input/s3/s3_integration_test.go +++ b/x-pack/filebeat/input/s3/s3_integration_test.go @@ -16,14 +16,14 @@ import ( "testing" "time" - "github.com/aws/aws-sdk-go-v2/service/s3/s3iface" - "github.com/aws/aws-sdk-go-v2/service/sqs/sqsiface" + "github.com/stretchr/testify/assert" "github.com/aws/aws-sdk-go-v2/aws" awssdk "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/s3" + "github.com/aws/aws-sdk-go-v2/service/s3/s3iface" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/stretchr/testify/assert" + "github.com/aws/aws-sdk-go-v2/service/sqs/sqsiface" "github.com/elastic/beats/v7/filebeat/channel" "github.com/elastic/beats/v7/filebeat/input" @@ -165,7 +165,7 @@ func runTest(t *testing.T, cfg *common.Config, run func(t *testing.T, input *s3I in, err := NewInput(cfg, connector, inputCtx) if err != nil { - t.Fatalf("Skipping: %v", err) + t.Fatal(err) } s3Input := in.(*s3Input) defer s3Input.Stop() From 45e856b9a91eab0b0549ab4648030a7c86cbb567 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 11 Mar 2020 00:26:29 +0100 Subject: [PATCH 07/12] Fix return --- x-pack/metricbeat/module/azure/test/integration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/metricbeat/module/azure/test/integration.go b/x-pack/metricbeat/module/azure/test/integration.go index ed6326ebfb6..e3023573949 100644 --- a/x-pack/metricbeat/module/azure/test/integration.go +++ b/x-pack/metricbeat/module/azure/test/integration.go @@ -39,5 +39,5 @@ func GetConfig(t *testing.T, metricSetName string) map[string]interface{} { "client_secret": clientSecret, "tenant_id": tenantId, "subscription_id": subId, - }, nil + } } From a50ce832a3341be20562fe122fd49a48ca800648 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 11 Mar 2020 13:45:21 +0100 Subject: [PATCH 08/12] Remove unused import --- x-pack/metricbeat/module/azure/test/integration.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/metricbeat/module/azure/test/integration.go b/x-pack/metricbeat/module/azure/test/integration.go index e3023573949..7187e3b93f7 100644 --- a/x-pack/metricbeat/module/azure/test/integration.go +++ b/x-pack/metricbeat/module/azure/test/integration.go @@ -5,7 +5,6 @@ package test import ( - "errors" "os" "testing" ) From 171853e9372377febb968e60d60f660ecce8371f Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 11 Mar 2020 19:37:05 +0100 Subject: [PATCH 09/12] Add some comments about TEST_TAGS in mage code --- dev-tools/mage/gotest.go | 2 ++ metricbeat/magefile.go | 1 + x-pack/metricbeat/magefile.go | 2 ++ 3 files changed, 5 insertions(+) diff --git a/dev-tools/mage/gotest.go b/dev-tools/mage/gotest.go index f75b2211a1d..e84ef65ce69 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -92,6 +92,8 @@ func makeGoTestArgsForModule(name, module string) GoTestArgs { return params } +// testTagsFromEnv gets a list of comma-separated tags from the TEST_TAGS +// environment variables, e.g: TEST_TAGS=aws,azure. func testTagsFromEnv() []string { return strings.Split(strings.Trim(os.Getenv("TEST_TAGS"), ", "), ",") } diff --git a/metricbeat/magefile.go b/metricbeat/magefile.go index 2f955efb725..6ff8776c800 100644 --- a/metricbeat/magefile.go +++ b/metricbeat/magefile.go @@ -172,6 +172,7 @@ func CollectDocs() error { // GoIntegTest executes the Go integration tests. // Use TEST_COVERAGE=true to enable code coverage profiling. // Use RACE_DETECTOR=true to enable the race detector. +// Use TEST_TAGS=tag1,tag2 to add additional build tags. func GoIntegTest(ctx context.Context) error { return devtools.GoTestIntegrationForModule(ctx) } diff --git a/x-pack/metricbeat/magefile.go b/x-pack/metricbeat/magefile.go index 86572c9be90..a75c9b2ff5a 100644 --- a/x-pack/metricbeat/magefile.go +++ b/x-pack/metricbeat/magefile.go @@ -138,6 +138,7 @@ func UnitTest() { // GoUnitTest executes the Go unit tests. // Use TEST_COVERAGE=true to enable code coverage profiling. // Use RACE_DETECTOR=true to enable the race detector. +// Use TEST_TAGS=tag1,tag2 to add additional build tags. func GoUnitTest(ctx context.Context) error { return devtools.GoTest(ctx, devtools.DefaultGoTestUnitArgs()) } @@ -158,6 +159,7 @@ func IntegTest() { // GoIntegTest executes the Go integration tests. // Use TEST_COVERAGE=true to enable code coverage profiling. // Use RACE_DETECTOR=true to enable the race detector. +// Use TEST_TAGS=tag1,tag2 to add additional build tags. func GoIntegTest(ctx context.Context) error { return devtools.GoTestIntegrationForModule(ctx) } From 3ebda8bee321e6fb7dfddc1d083a7dc4e5afb567 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 11 Mar 2020 20:17:14 +0100 Subject: [PATCH 10/12] Add TEST_TAGS to the list of variables passed through the testing environment --- dev-tools/mage/integtest.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-tools/mage/integtest.go b/dev-tools/mage/integtest.go index 41219d58d6c..64fa8209009 100644 --- a/dev-tools/mage/integtest.go +++ b/dev-tools/mage/integtest.go @@ -147,6 +147,7 @@ func RunIntegTest(mageTarget string, test func() error, passThroughEnvVars ...st env := []string{ "TEST_COVERAGE", "RACE_DETECTOR", + "TEST_TAGS", "PYTHON_EXE", } env = append(env, passThroughEnvVars...) From bb39a97ec72a9306fe778c749f3f7ca429a0cb8a Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Thu, 12 Mar 2020 19:42:09 +0100 Subject: [PATCH 11/12] XXX: Revert this --- .ci/scripts/travis_has_changes.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.ci/scripts/travis_has_changes.sh b/.ci/scripts/travis_has_changes.sh index 0c2d8d10da0..421748aeb4f 100755 --- a/.ci/scripts/travis_has_changes.sh +++ b/.ci/scripts/travis_has_changes.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash + +# XXX: Revert this +exit 0 + set -exuo pipefail # commit range to check for. For example master... From 44339bd2085541992430dce8ef0342d232cd1596 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Fri, 13 Mar 2020 11:23:00 +0100 Subject: [PATCH 12/12] Revert "XXX: Revert this" This reverts commit bb39a97ec72a9306fe778c749f3f7ca429a0cb8a. --- .ci/scripts/travis_has_changes.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.ci/scripts/travis_has_changes.sh b/.ci/scripts/travis_has_changes.sh index 421748aeb4f..0c2d8d10da0 100755 --- a/.ci/scripts/travis_has_changes.sh +++ b/.ci/scripts/travis_has_changes.sh @@ -1,8 +1,4 @@ #!/usr/bin/env bash - -# XXX: Revert this -exit 0 - set -exuo pipefail # commit range to check for. For example master...