-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CoreDNS plugin connects to controller server
* Fix firewall-controller nix run target * Add helper targets to makefile * Add test Corefile
- Loading branch information
1 parent
c2c0917
commit b26c28b
Showing
7 changed files
with
99 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package squawker | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/coredns/caddy" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestSetupPlugin(t *testing.T) { | ||
config, err := parseArgs(caddy.NewTestController("dns", "squawker")) | ||
assert.Nil(t, config, "config not returned on error") | ||
assert.Error(t, err, "error on no args") | ||
|
||
config, err = parseArgs(caddy.NewTestController("dns", "squawker 192.168.1.1:8080")) | ||
assert.NotNil(t, config, "config returned on provided address") | ||
assert.Equal(t, "192.168.1.1:8080", config.address, "match provided address") | ||
assert.NoError(t, err, "no error on provided address") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
. { | ||
reload | ||
errors | ||
debug | ||
log | ||
squawker 127.0.0.1:8080 | ||
forward . 8.8.8.8 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters