mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-04-05 08:54:09 -04:00
26 lines
460 B
Go
26 lines
460 B
Go
package dns
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_New(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
intf, err := New(SetTimeout(time.Hour))
|
|
require.NoError(t, err)
|
|
|
|
impl, ok := intf.(*fetcher)
|
|
require.True(t, ok)
|
|
|
|
assert.NotNil(t, impl.ring.counter)
|
|
assert.NotEmpty(t, impl.ring.providers)
|
|
assert.NotNil(t, impl.client)
|
|
assert.NotNil(t, impl.client4)
|
|
assert.NotNil(t, impl.client6)
|
|
}
|