forked from TrueCloudLab/certificates
Small test fixes.
This commit is contained in:
parent
10bc548c6e
commit
cb46a8b741
1 changed files with 12 additions and 2 deletions
|
@ -462,9 +462,9 @@ func TestChallengeUnmarshal(t *testing.T) {
|
||||||
"fail/unexpected-type-dns": func(t *testing.T) test {
|
"fail/unexpected-type-dns": func(t *testing.T) test {
|
||||||
dnsCh, err := newDNSCh()
|
dnsCh, err := newDNSCh()
|
||||||
assert.FatalError(t, err)
|
assert.FatalError(t, err)
|
||||||
_tlsALPNCh, ok := dnsCh.(*dns01Challenge)
|
_dnsCh, ok := dnsCh.(*dns01Challenge)
|
||||||
assert.Fatal(t, ok)
|
assert.Fatal(t, ok)
|
||||||
_tlsALPNCh.baseChallenge.Type = "foo"
|
_dnsCh.baseChallenge.Type = "foo"
|
||||||
b, err := json.Marshal(dnsCh)
|
b, err := json.Marshal(dnsCh)
|
||||||
assert.FatalError(t, err)
|
assert.FatalError(t, err)
|
||||||
return test{
|
return test{
|
||||||
|
@ -492,6 +492,16 @@ func TestChallengeUnmarshal(t *testing.T) {
|
||||||
chb: b,
|
chb: b,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ok/alpn": func(t *testing.T) test {
|
||||||
|
tlsALPNCh, err := newTLSALPNCh()
|
||||||
|
assert.FatalError(t, err)
|
||||||
|
b, err := json.Marshal(tlsALPNCh)
|
||||||
|
assert.FatalError(t, err)
|
||||||
|
return test{
|
||||||
|
ch: tlsALPNCh,
|
||||||
|
chb: b,
|
||||||
|
}
|
||||||
|
},
|
||||||
"ok/err": func(t *testing.T) test {
|
"ok/err": func(t *testing.T) test {
|
||||||
httpCh, err := newHTTPCh()
|
httpCh, err := newHTTPCh()
|
||||||
assert.FatalError(t, err)
|
assert.FatalError(t, err)
|
||||||
|
|
Loading…
Reference in a new issue