blocky/cmd/serve_test.go

27 lines
457 B
Go
Raw Normal View History

2020-05-04 22:20:13 +02:00
package cmd
import (
"time"
2021-08-25 22:06:34 +02:00
"github.com/0xERR0R/blocky/config"
2020-05-04 22:20:13 +02:00
. "github.com/onsi/ginkgo"
)
var _ = Describe("Serve command", func() {
When("Serve command is called", func() {
It("should start DNS server", func() {
config.GetConfig().BootstrapDNS = config.Upstream{
2021-02-08 21:57:59 +01:00
Net: "tcp+udp",
2020-05-04 22:20:13 +02:00
Host: "1.1.1.1",
Port: 53,
}
2021-02-08 21:57:59 +01:00
go startServer(newServeCommand(), []string{})
2020-05-04 22:20:13 +02:00
time.Sleep(100 * time.Millisecond)
done <- true
})
})
})