updater: refactoring and set DNS server correctly
- Fix CLI operation not setting DNS server - Fix periodic operation not setting DNS server - Set DNS address for resolution once at start for both CLI and periodic operation - Inject resolver to each provider instead of creating it within - Use resolver settings on every call to `.Resolve` method, instead of passing it to constructor - Move out minServers check from resolver
This commit is contained in:
@@ -93,7 +93,8 @@ func Test_Provider_GetConnection(t *testing.T) {
|
||||
randSource := rand.NewSource(0)
|
||||
|
||||
warner := (common.Warner)(nil)
|
||||
provider := New(storage, randSource, warner)
|
||||
parallelResolver := (common.ParallelResolver)(nil)
|
||||
provider := New(storage, randSource, warner, parallelResolver)
|
||||
|
||||
if testCase.panicMessage != "" {
|
||||
assert.PanicsWithValue(t, testCase.panicMessage, func() {
|
||||
|
||||
Reference in New Issue
Block a user