Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: skip longer/integration tests on -short mode #10860

Merged
merged 1 commit into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions plugins/inputs/cloud_pubsub/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ 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{}
Expand Down
4 changes: 4 additions & 0 deletions plugins/inputs/influxdb_listener/influxdb_listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ func TestWriteHighTraffic(t *testing.T) {
if runtime.GOOS == "darwin" {
t.Skip("Skipping due to hang on darwin")
}
// resource intensive, large test
if testing.Short() {
t.Skip("Skipping long test in short mode")
}
listener := newTestListener()

acc := &testutil.Accumulator{}
Expand Down
16 changes: 16 additions & 0 deletions plugins/inputs/leofs/leofs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,33 @@ func testMain(t *testing.T, code string, endpoint string, serverType ServerType)
}

func TestLeoFSManagerMasterMetrics(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

testMain(t, fakeSNMP4Manager, "localhost:4020", ServerTypeManagerMaster)
}

func TestLeoFSManagerSlaveMetrics(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

testMain(t, fakeSNMP4Manager, "localhost:4021", ServerTypeManagerSlave)
}

func TestLeoFSStorageMetrics(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

testMain(t, fakeSNMP4Storage, "localhost:4010", ServerTypeStorage)
}

func TestLeoFSGatewayMetrics(t *testing.T) {
if testing.Short() {
t.Skip("Skipping integration test in short mode")
}

testMain(t, fakeSNMP4Gateway, "localhost:4000", ServerTypeGateway)
}
20 changes: 20 additions & 0 deletions plugins/inputs/vsphere/vsphere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ func TestConfigDurationParsing(t *testing.T) {
}

func TestMaxQuery(t *testing.T) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}

// Don't run test on 32-bit machines due to bug in simulator.
// https://github.com/vmware/govmomi/issues/1330
var i int
Expand Down Expand Up @@ -295,6 +299,10 @@ func testLookupVM(ctx context.Context, t *testing.T, f *Finder, path string, exp
}

func TestFinder(t *testing.T) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}

// Don't run test on 32-bit machines due to bug in simulator.
// https://github.com/vmware/govmomi/issues/1330
var i int
Expand Down Expand Up @@ -411,6 +419,10 @@ func TestFinder(t *testing.T) {
}

func TestFolders(t *testing.T) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}

// Don't run test on 32-bit machines due to bug in simulator.
// https://github.com/vmware/govmomi/issues/1330
var i int
Expand Down Expand Up @@ -452,10 +464,18 @@ func TestFolders(t *testing.T) {
}

func TestCollectionWithClusterMetrics(t *testing.T) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}

testCollection(t, false)
}

func TestCollectionNoClusterMetrics(t *testing.T) {
if testing.Short() {
t.Skip("Skipping long test in short mode")
}

testCollection(t, true)
}

Expand Down