go test -short
Added a bunch a long running test function to the list of skipped tests when giving -short to go test. Tests are bascially *all* DNSSEC key generation tests and 1 serving test. PASS ok github.com/miekg/dns 0.782s Compared to 13+ s, so quite a bit faster.
This commit is contained in:
parent
f3ed7c2b59
commit
5fc7e36983
|
@ -34,6 +34,9 @@ func getSoa() *SOA {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGenerateEC(t *testing.T) {
|
func TestGenerateEC(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping test in short mode.")
|
||||||
|
}
|
||||||
key := new(DNSKEY)
|
key := new(DNSKEY)
|
||||||
key.Hdr.Rrtype = TypeDNSKEY
|
key.Hdr.Rrtype = TypeDNSKEY
|
||||||
key.Hdr.Name = "miek.nl."
|
key.Hdr.Name = "miek.nl."
|
||||||
|
@ -48,6 +51,9 @@ func TestGenerateEC(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGenerateDSA(t *testing.T) {
|
func TestGenerateDSA(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping test in short mode.")
|
||||||
|
}
|
||||||
key := new(DNSKEY)
|
key := new(DNSKEY)
|
||||||
key.Hdr.Rrtype = TypeDNSKEY
|
key.Hdr.Rrtype = TypeDNSKEY
|
||||||
key.Hdr.Name = "miek.nl."
|
key.Hdr.Name = "miek.nl."
|
||||||
|
@ -62,6 +68,9 @@ func TestGenerateDSA(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGenerateRSA(t *testing.T) {
|
func TestGenerateRSA(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping test in short mode.")
|
||||||
|
}
|
||||||
key := new(DNSKEY)
|
key := new(DNSKEY)
|
||||||
key.Hdr.Rrtype = TypeDNSKEY
|
key.Hdr.Rrtype = TypeDNSKEY
|
||||||
key.Hdr.Name = "miek.nl."
|
key.Hdr.Name = "miek.nl."
|
||||||
|
@ -283,6 +292,9 @@ func TestTag(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestKeyRSA(t *testing.T) {
|
func TestKeyRSA(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping test in short mode.")
|
||||||
|
}
|
||||||
key := new(DNSKEY)
|
key := new(DNSKEY)
|
||||||
key.Hdr.Name = "miek.nl."
|
key.Hdr.Name = "miek.nl."
|
||||||
key.Hdr.Rrtype = TypeDNSKEY
|
key.Hdr.Rrtype = TypeDNSKEY
|
||||||
|
|
|
@ -1231,6 +1231,9 @@ type algorithm struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNewPrivateKeyECDSA(t *testing.T) {
|
func TestNewPrivateKeyECDSA(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping test in short mode.")
|
||||||
|
}
|
||||||
algorithms := []algorithm{
|
algorithms := []algorithm{
|
||||||
algorithm{ECDSAP256SHA256, 256},
|
algorithm{ECDSAP256SHA256, 256},
|
||||||
algorithm{ECDSAP384SHA384, 384},
|
algorithm{ECDSAP384SHA384, 384},
|
||||||
|
|
|
@ -303,6 +303,9 @@ func TestServingLargeResponses(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestServingResponse(t *testing.T) {
|
func TestServingResponse(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping test in short mode.")
|
||||||
|
}
|
||||||
HandleFunc("miek.nl.", HelloServer)
|
HandleFunc("miek.nl.", HelloServer)
|
||||||
s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
|
s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -6,6 +6,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSIG0(t *testing.T) {
|
func TestSIG0(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping test in short mode.")
|
||||||
|
}
|
||||||
m := new(Msg)
|
m := new(Msg)
|
||||||
m.SetQuestion("example.org.", TypeSOA)
|
m.SetQuestion("example.org.", TypeSOA)
|
||||||
for _, alg := range []uint8{DSA, ECDSAP256SHA256, ECDSAP384SHA384, RSASHA1, RSASHA256, RSASHA512} {
|
for _, alg := range []uint8{DSA, ECDSAP256SHA256, ECDSAP384SHA384, RSASHA1, RSASHA256, RSASHA512} {
|
||||||
|
|
Loading…
Reference in New Issue