mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-04-05 08:54:09 -04:00
- Fix critical issue #492 - Remove `google` dns provider since it does not support DNS over TLS
34 lines
616 B
Go
34 lines
616 B
Go
//go:build integration
|
|
// +build integration
|
|
|
|
package dns
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_integration(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
fetcher, err := New(SetProviders(Cloudflare, OpenDNS))
|
|
require.NoError(t, err)
|
|
|
|
ctx := context.Background()
|
|
|
|
publicIP1, err := fetcher.IP4(ctx)
|
|
require.NoError(t, err)
|
|
assert.NotNil(t, publicIP1)
|
|
|
|
publicIP2, err := fetcher.IP4(ctx)
|
|
require.NoError(t, err)
|
|
assert.NotNil(t, publicIP2)
|
|
|
|
assert.Equal(t, publicIP1.String(), publicIP2.String())
|
|
|
|
t.Logf("Public IP is %s", publicIP1)
|
|
}
|