We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef53d40 commit 31ab0acCopy full SHA for 31ab0ac
plugin_internals_test.go
@@ -0,0 +1,23 @@
1
+package caddy_remote_host
2
+
3
+// These tests target unexported fields and methods. For tests of the
4
+// public API see package caddy_remote_host_test.
5
6
+import (
7
+ "testing"
8
9
+ "github.com/caddyserver/caddy/v2"
10
+ "github.com/stretchr/testify/assert"
11
+ "github.com/stretchr/testify/require"
12
+)
13
14
+func TestMatchRemoteHost_Provision(t *testing.T) {
15
+ hostRegex = nil
16
17
+ subject := MatchRemoteHost{}
18
+ err := subject.Provision(caddy.Context{})
19
+ require.NoError(t, err)
20
+ assert.NotNil(t, subject.logger)
21
+ assert.NotNil(t, subject.cache)
22
+ assert.NotNil(t, hostRegex)
23
+}
0 commit comments