mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
fix: test teardown dns data race
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
This commit is contained in:
parent
4b8e61093d
commit
82bc9adcc2
1 changed files with 4 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/distribution/distribution/v3/configuration"
|
||||
|
|
@ -172,6 +173,9 @@ func setup(suite *TestSuite, tlsEnabled, insecure bool) *registry.Registry {
|
|||
}
|
||||
|
||||
func teardown(suite *TestSuite) {
|
||||
var lock sync.Mutex
|
||||
lock.Lock()
|
||||
defer lock.Unlock()
|
||||
if suite.srv != nil {
|
||||
mockdns.UnpatchNet(net.DefaultResolver)
|
||||
suite.srv.Close()
|
||||
|
|
|
|||
Loading…
Reference in a new issue