test: add circle ci integration testing on PRs (#11246)

This commit is contained in:
Joshua Powers 2022-06-03 10:33:28 -06:00 committed by GitHub
parent 9daefaba11
commit 58e01f72b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 35 additions and 32 deletions

View File

@ -203,6 +203,17 @@ jobs:
- run: 'GOARCH=386 make check'
- test-go:
arch: "386"
test-integration:
machine:
image: ubuntu-2204:current
resource_class: large
steps:
- checkout
- restore_cache:
key: go-mod-v1-{{ checksum "go.sum" }}
- check-changed-files-or-halt
- run: 'make deps'
- run: 'make test-integration'
test-go-mac:
executor: mac
steps:
@ -492,6 +503,10 @@ workflows:
filters:
tags:
only: /.*/
- 'test-integration':
filters:
tags:
only: /.*/
- 'windows-package':
requires:
- 'test-go-windows'

View File

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/require"
)
func TestSocks5ProxyConfig(t *testing.T) {
func TestSocks5ProxyConfigIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

View File

@ -197,11 +197,6 @@ func TestRunOverlongMessages(t *testing.T) {
}
func TestRunErrorInSubscriber(t *testing.T) {
// hard-coded retry in seconds
if testing.Short() {
t.Skip("Skipping long test in short mode")
}
subID := "sub-unexpected-error"
acc := &testutil.Accumulator{}

View File

@ -597,7 +597,7 @@ func setupIntegrationTest(t *testing.T) (*testutil.Container, error) {
return &container, nil
}
func TestElasticsearchQuery(t *testing.T) {
func TestElasticsearchQueryIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
@ -658,7 +658,7 @@ func TestElasticsearchQuery(t *testing.T) {
}
}
func TestElasticsearchQuery_getMetricFields(t *testing.T) {
func TestElasticsearchQueryIntegration_getMetricFields(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

View File

@ -18,7 +18,7 @@ import (
const masterName = "mymaster"
func TestRedisSentinelConnect(t *testing.T) {
func TestRedisSentinelConnectIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

View File

@ -29,7 +29,7 @@ func pwgen(n int) string {
return string(buffer)
}
func TestMariaDB(t *testing.T) {
func TestMariaDBIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
@ -136,7 +136,7 @@ func TestMariaDB(t *testing.T) {
}
}
func TestPostgreSQL(t *testing.T) {
func TestPostgreSQLIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
@ -243,7 +243,7 @@ func TestPostgreSQL(t *testing.T) {
}
}
func TestClickHouse(t *testing.T) {
func TestClickHouseIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

View File

@ -74,7 +74,7 @@ func TestConnectAndWriteIntegration(t *testing.T) {
require.NoError(t, err)
}
func TestConnectAndWriteMetricWithNaNValueEmpty(t *testing.T) {
func TestConnectAndWriteMetricWithNaNValueEmptyIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
@ -117,7 +117,7 @@ func TestConnectAndWriteMetricWithNaNValueEmpty(t *testing.T) {
}
}
func TestConnectAndWriteMetricWithNaNValueNone(t *testing.T) {
func TestConnectAndWriteMetricWithNaNValueNoneIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
@ -161,7 +161,7 @@ func TestConnectAndWriteMetricWithNaNValueNone(t *testing.T) {
}
}
func TestConnectAndWriteMetricWithNaNValueDrop(t *testing.T) {
func TestConnectAndWriteMetricWithNaNValueDropIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
@ -205,7 +205,7 @@ func TestConnectAndWriteMetricWithNaNValueDrop(t *testing.T) {
}
}
func TestConnectAndWriteMetricWithNaNValueReplacement(t *testing.T) {
func TestConnectAndWriteMetricWithNaNValueReplacementIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

View File

@ -69,10 +69,6 @@ func TestInitAndWrite(t *testing.T) {
*/
func TestInitAndWriteIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
if os.Getenv("EVENTHUB_CONNECTION_STRING") == "" {
t.Skip("Missing environment variable EVENTHUB_CONNECTION_STRING")
}

View File

@ -95,7 +95,7 @@ func TestConnectAndWriteIntegration(t *testing.T) {
k.Close()
}
func TestTopicSuffixesIntegration(t *testing.T) {
func TestTopicSuffixes(t *testing.T) {
topic := "Test"
m := testutil.TestMetric(1)
@ -138,7 +138,7 @@ func TestTopicSuffixesIntegration(t *testing.T) {
}
}
func TestValidateTopicSuffixMethodIntegration(t *testing.T) {
func TestValidateTopicSuffixMethod(t *testing.T) {
err := ValidateTopicSuffixMethod("invalid_topic_suffix_method")
require.Error(t, err, "Topic suffix method used should be invalid.")

View File

@ -19,9 +19,6 @@ func TestBasic(t *testing.T) {
InsightsKey: "12345",
Timeout: config.Duration(time.Second * 5),
}
if testing.Short() {
t.Skip("skipping test in short mode.")
}
err := nr.Connect()
require.NoError(t, err)

View File

@ -16,19 +16,19 @@ import (
"github.com/testcontainers/testcontainers-go/wait"
)
func TestSqlQuote(t *testing.T) {
func TestSqlQuoteIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
}
func TestSqlCreateStatement(t *testing.T) {
func TestSqlCreateStatementIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
}
func TestSqlInsertStatement(t *testing.T) {
func TestSqlInsertStatementIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

View File

@ -11,7 +11,7 @@ import (
"github.com/influxdata/telegraf/testutil"
)
func TestSimpleReverseLookup(t *testing.T) {
func TestSimpleReverseLookupIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
)
func TestEmptyContainer(t *testing.T) {
func TestEmptyContainerIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
@ -22,7 +22,7 @@ func TestEmptyContainer(t *testing.T) {
require.NoError(t, err)
}
func TestMappedPortLookup(t *testing.T) {
func TestMappedPortLookupIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}
@ -59,7 +59,7 @@ func TestMappedPortLookup(t *testing.T) {
}
}
func TestBadImageName(t *testing.T) {
func TestBadImageNameIntegration(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}