Skip to content

Commit 4b6e0e9

Browse files
committed
tls: Fix failing test
1 parent 2bcbdd6 commit 4b6e0e9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

caddy/setup/tls_test.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ func TestTLSParseBasic(t *testing.T) {
6464
}
6565

6666
func TestTLSParseIncompleteParams(t *testing.T) {
67-
// This doesn't do anything useful but is allowed in case the user wants to be explicit
68-
// about TLS being enabled...
67+
// Using tls without args is an error because it's unnecessary.
6968
c := NewTestController(`tls`)
7069
_, err := TLS(c)
71-
if err != nil {
72-
t.Errorf("Expected no error, but got %v", err)
70+
if err == nil {
71+
t.Error("Expected an error, but didn't get one")
7372
}
7473
}
7574

0 commit comments

Comments
 (0)