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

This commit is contained in:
Joshua Powers 2022-03-24 10:55:36 -07:00 committed by GitHub
parent 37d97ff4e3
commit 58a69d43eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 0 deletions

View File

@ -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{}

View File

@ -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{}

View File

@ -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)
}

View File

@ -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
@ -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
@ -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
@ -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)
}