test: add circle ci integration testing on PRs (#11246)
This commit is contained in:
parent
9daefaba11
commit
58e01f72b2
|
|
@ -203,6 +203,17 @@ jobs:
|
||||||
- run: 'GOARCH=386 make check'
|
- run: 'GOARCH=386 make check'
|
||||||
- test-go:
|
- test-go:
|
||||||
arch: "386"
|
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:
|
test-go-mac:
|
||||||
executor: mac
|
executor: mac
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -492,6 +503,10 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
- 'test-integration':
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /.*/
|
||||||
- 'windows-package':
|
- 'windows-package':
|
||||||
requires:
|
requires:
|
||||||
- 'test-go-windows'
|
- 'test-go-windows'
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSocks5ProxyConfig(t *testing.T) {
|
func TestSocks5ProxyConfigIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -197,11 +197,6 @@ func TestRunOverlongMessages(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRunErrorInSubscriber(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"
|
subID := "sub-unexpected-error"
|
||||||
|
|
||||||
acc := &testutil.Accumulator{}
|
acc := &testutil.Accumulator{}
|
||||||
|
|
|
||||||
|
|
@ -597,7 +597,7 @@ func setupIntegrationTest(t *testing.T) (*testutil.Container, error) {
|
||||||
return &container, nil
|
return &container, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestElasticsearchQuery(t *testing.T) {
|
func TestElasticsearchQueryIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
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() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import (
|
||||||
|
|
||||||
const masterName = "mymaster"
|
const masterName = "mymaster"
|
||||||
|
|
||||||
func TestRedisSentinelConnect(t *testing.T) {
|
func TestRedisSentinelConnectIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ func pwgen(n int) string {
|
||||||
return string(buffer)
|
return string(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMariaDB(t *testing.T) {
|
func TestMariaDBIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
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() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
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() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ func TestConnectAndWriteIntegration(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestConnectAndWriteMetricWithNaNValueEmpty(t *testing.T) {
|
func TestConnectAndWriteMetricWithNaNValueEmptyIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
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() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
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() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
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() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,6 @@ func TestInitAndWrite(t *testing.T) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
func TestInitAndWriteIntegration(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") == "" {
|
if os.Getenv("EVENTHUB_CONNECTION_STRING") == "" {
|
||||||
t.Skip("Missing environment variable EVENTHUB_CONNECTION_STRING")
|
t.Skip("Missing environment variable EVENTHUB_CONNECTION_STRING")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ func TestConnectAndWriteIntegration(t *testing.T) {
|
||||||
k.Close()
|
k.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTopicSuffixesIntegration(t *testing.T) {
|
func TestTopicSuffixes(t *testing.T) {
|
||||||
topic := "Test"
|
topic := "Test"
|
||||||
|
|
||||||
m := testutil.TestMetric(1)
|
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")
|
err := ValidateTopicSuffixMethod("invalid_topic_suffix_method")
|
||||||
require.Error(t, err, "Topic suffix method used should be invalid.")
|
require.Error(t, err, "Topic suffix method used should be invalid.")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,6 @@ func TestBasic(t *testing.T) {
|
||||||
InsightsKey: "12345",
|
InsightsKey: "12345",
|
||||||
Timeout: config.Duration(time.Second * 5),
|
Timeout: config.Duration(time.Second * 5),
|
||||||
}
|
}
|
||||||
if testing.Short() {
|
|
||||||
t.Skip("skipping test in short mode.")
|
|
||||||
}
|
|
||||||
|
|
||||||
err := nr.Connect()
|
err := nr.Connect()
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
|
||||||
|
|
@ -16,19 +16,19 @@ import (
|
||||||
"github.com/testcontainers/testcontainers-go/wait"
|
"github.com/testcontainers/testcontainers-go/wait"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSqlQuote(t *testing.T) {
|
func TestSqlQuoteIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSqlCreateStatement(t *testing.T) {
|
func TestSqlCreateStatementIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSqlInsertStatement(t *testing.T) {
|
func TestSqlInsertStatementIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"github.com/influxdata/telegraf/testutil"
|
"github.com/influxdata/telegraf/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimpleReverseLookup(t *testing.T) {
|
func TestSimpleReverseLookupIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestEmptyContainer(t *testing.T) {
|
func TestEmptyContainerIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
@ -22,7 +22,7 @@ func TestEmptyContainer(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMappedPortLookup(t *testing.T) {
|
func TestMappedPortLookupIntegration(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
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() {
|
if testing.Short() {
|
||||||
t.Skip("Skipping integration test in short mode")
|
t.Skip("Skipping integration test in short mode")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue