mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
BUG: Integration test flag -end 0 doesnt stop at 0 (#2059)
This commit is contained in:
@ -22,8 +22,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var providerToRun = flag.String("provider", "", "Provider to run")
|
var providerToRun = flag.String("provider", "", "Provider to run")
|
||||||
var startIdx = flag.Int("start", 0, "Test number to begin with")
|
var startIdx = flag.Int("start", -1, "Test number to begin with")
|
||||||
var endIdx = flag.Int("end", 0, "Test index to stop after")
|
var endIdx = flag.Int("end", -1, "Test index to stop after")
|
||||||
var verbose = flag.Bool("verbose", false, "Print corrections as you run them")
|
var verbose = flag.Bool("verbose", false, "Print corrections as you run them")
|
||||||
var printElapsed = flag.Bool("elapsed", false, "Print elapsed time for each testgroup")
|
var printElapsed = flag.Bool("elapsed", false, "Print elapsed time for each testgroup")
|
||||||
var enableCFWorkers = flag.Bool("cfworkers", true, "Set false to disable CF worker tests")
|
var enableCFWorkers = flag.Bool("cfworkers", true, "Set false to disable CF worker tests")
|
||||||
@ -254,8 +254,11 @@ func runTests(t *testing.T, prv providers.DNSServiceProvider, domainName string,
|
|||||||
testGroups := makeTests(t)
|
testGroups := makeTests(t)
|
||||||
|
|
||||||
firstGroup := *startIdx
|
firstGroup := *startIdx
|
||||||
|
if firstGroup == -1 {
|
||||||
|
firstGroup = 0
|
||||||
|
}
|
||||||
lastGroup := *endIdx
|
lastGroup := *endIdx
|
||||||
if lastGroup == 0 {
|
if lastGroup == -1 {
|
||||||
lastGroup = len(testGroups)
|
lastGroup = len(testGroups)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +294,7 @@ func runTests(t *testing.T, prv providers.DNSServiceProvider, domainName string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove all records so next group starts with a clean slate.
|
// Remove all records so next group starts with a clean slate.
|
||||||
makeChanges(t, prv, dc, tc("Empty"), "Post cleanup", false, nil)
|
makeChanges(t, prv, dc, tc("Empty"), "Post cleanup", true, nil)
|
||||||
|
|
||||||
elapsed := time.Since(start)
|
elapsed := time.Since(start)
|
||||||
if *printElapsed {
|
if *printElapsed {
|
||||||
|
Reference in New Issue
Block a user