mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
TESTING: Disable colorized output during tests (#2248)
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
@@ -6,9 +6,18 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/v3/models"
|
"github.com/StackExchange/dnscontrol/v3/models"
|
||||||
|
"github.com/fatih/color"
|
||||||
"github.com/kylelemons/godebug/diff"
|
"github.com/kylelemons/godebug/diff"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// Disable colorizing the output.
|
||||||
|
// NOTE: "go test ./..." turns it off automatically but "cd
|
||||||
|
// pkg/diff2 && go test" does not. Without this statement, the
|
||||||
|
// latter fails.
|
||||||
|
color.NoColor = true
|
||||||
|
}
|
||||||
|
|
||||||
var testDataAA1234 = makeRec("laba", "A", "1.2.3.4") // [0]
|
var testDataAA1234 = makeRec("laba", "A", "1.2.3.4") // [0]
|
||||||
var testDataAA5678 = makeRec("laba", "A", "5.6.7.8") //
|
var testDataAA5678 = makeRec("laba", "A", "5.6.7.8") //
|
||||||
var testDataAA1234ttl700 = makeRecTTL("laba", "A", "1.2.3.4", 700) //
|
var testDataAA1234ttl700 = makeRecTTL("laba", "A", "1.2.3.4", 700) //
|
||||||
|
Reference in New Issue
Block a user