1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Fix broken tests (#672)

This commit is contained in:
Tom Limoncelli
2020-02-29 09:01:51 -05:00
committed by GitHub
parent 2dcb33e7b7
commit b7b0b20798
3 changed files with 15 additions and 13 deletions

View File

@@ -476,7 +476,9 @@
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
@@ -518,8 +520,8 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
<td class="success" data-toggle="tooltip" data-container="body" data-placement="top" title="SRV records with empty targets are not supported">
<i class="fa has-tooltip fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
@@ -533,8 +535,8 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
<td class="success" data-toggle="tooltip" data-container="body" data-placement="top" title="SRV records with empty targets are not supported">
<i class="fa has-tooltip fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
@@ -991,8 +993,8 @@
<i class="fa fa-circle-o text-info" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td class="info">
<i class="fa fa-circle-o text-info" aria-hidden="true"></i>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>

View File

@@ -23,7 +23,7 @@ func TestCheckLabel(t *testing.T) {
{"_foo", "TLSA", "zap", false, false},
{"_foo", "TXT", "zap", false, false},
{"_y2", "CNAME", "foo", true, false},
{"_y3", "CNAME", "asfljds.acm-validations.aws", false, false},
{"_y3", "CNAME", "asfljds.acm-validations.aws.", false, false},
{"test.foo.tld", "A", "zap", true, false},
{"test.foo.tld", "A", "zap", false, true},
}

View File

@@ -49,7 +49,7 @@ func TestMostCommonTtl(t *testing.T) {
records = nil
records, e = append(records, r1, r1, r1), 100
x := models.RRstoRCs(records, "bosun.org")
g = mostCommonTTL(x)
g = MostCommonTTL(x)
if e != g {
t.Fatalf("expected %d; got %d\n", e, g)
}
@@ -57,7 +57,7 @@ func TestMostCommonTtl(t *testing.T) {
// Mixture of TTLs with an obvious winner.
records = nil
records, e = append(records, r1, r2, r2), 200
g = mostCommonTTL(models.RRstoRCs(records, "bosun.org"))
g = MostCommonTTL(models.RRstoRCs(records, "bosun.org"))
if e != g {
t.Fatalf("expected %d; got %d\n", e, g)
}
@@ -65,7 +65,7 @@ func TestMostCommonTtl(t *testing.T) {
// 3-way tie. Largest TTL should be used.
records = nil
records, e = append(records, r1, r2, r3), 300
g = mostCommonTTL(models.RRstoRCs(records, "bosun.org"))
g = MostCommonTTL(models.RRstoRCs(records, "bosun.org"))
if e != g {
t.Fatalf("expected %d; got %d\n", e, g)
}
@@ -73,7 +73,7 @@ func TestMostCommonTtl(t *testing.T) {
// NS records are ignored.
records = nil
records, e = append(records, r1, r4, r5), 100
g = mostCommonTTL(models.RRstoRCs(records, "bosun.org"))
g = MostCommonTTL(models.RRstoRCs(records, "bosun.org"))
if e != g {
t.Fatalf("expected %d; got %d\n", e, g)
}
@@ -295,7 +295,7 @@ func TestWriteZoneFileSynth(t *testing.T) {
recs = append(recs, rsynz)
buf := &bytes.Buffer{}
WriteZoneFileRC(buf, recs, "bosun.org", []string{"c1", "c2", "c3\nc4"})
WriteZoneFileRC(buf, recs, "bosun.org", 0, []string{"c1", "c2", "c3\nc4"})
expected := `$TTL 300
; c1
; c2