Add test_list command, to enumerate unit and e2e tests.
This uses go/parser and go/ast to analyze all test files in ~1 second. It only recognizes a few simple structures that the tests all have, and modifies a few tests to fit expected structure better. This is part of an effort to ensure all tests have owners, by having a verify check to catch new tests being added without an owner.
This commit is contained in:
@@ -43,12 +43,10 @@ var _ = framework.KubeDescribe("Networking IPerf [Experimental] [Slow] [Feature:
|
||||
|
||||
// A few simple bandwidth tests which are capped by nodes.
|
||||
// TODO replace the 1 with the scale option implementation
|
||||
runClientServerBandwidthMeasurement(f, 1, gceBandwidthBitsEstimate)
|
||||
})
|
||||
|
||||
func runClientServerBandwidthMeasurement(f *framework.Framework, numClient int, maxBandwidthBits int64) {
|
||||
// TODO: Make this a function parameter, once we distribute iperf endpoints, possibly via session affinity.
|
||||
numClient := 1
|
||||
numServer := 1
|
||||
maxBandwidthBits := gceBandwidthBitsEstimate
|
||||
|
||||
It(fmt.Sprintf("should transfer ~ 1GB onto the service endpoint %v servers (maximum of %v clients)", numServer, numClient), func() {
|
||||
nodes := framework.GetReadySchedulableNodesOrDie(f.Client)
|
||||
@@ -153,4 +151,4 @@ func runClientServerBandwidthMeasurement(f *framework.Framework, numClient int,
|
||||
framework.Logf("%v had bandwidth %v. Ratio to expected (%v) was %f", ipClient, bandwidth, expectedBandwidth, float64(bandwidth)/float64(expectedBandwidth))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user