Skip to content

Commit

Permalink
fix CI issues
Browse files Browse the repository at this point in the history
Signed-off-by: denis-tingajkin <denis.tingajkin@xored.com>
  • Loading branch information
denis-tingaikin committed Apr 13, 2020
1 parent d1b64e5 commit 86c796c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
- name: Install yamllint
Expand All @@ -18,14 +18,14 @@ jobs:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: shellcheck
uses: azohra/shell-linter@v0.2.0
uses: fkautz/shell-linter@v0.2.0
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.13.4
Expand All @@ -35,7 +35,7 @@ jobs:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.13.4
Expand All @@ -53,7 +53,7 @@ jobs:
GOLANGCI_LINT_CONTAINER: golangci/golangci-lint:v1.23.2
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Pull golangci-lint docker container
run: docker pull ${GOLANGCI_LINT_CONTAINER}
- name: Run golangci-lint
Expand All @@ -65,7 +65,7 @@ jobs:
TAG: test
ORG: networkservicemesh
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.13.4
Expand All @@ -82,7 +82,7 @@ jobs:
name: exclude fmt.Errorf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Exclude fmt.Errorf
run: |
if grep -r --include=*.go fmt.Errorf . ; then
Expand All @@ -94,7 +94,7 @@ jobs:
name: Restrict dependencies on github.com/networkservicemesh/*
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Restrict dependencies on github.com/networkservicemesh/*
run: |
for i in $(grep github.com/networkservicemesh/ go.mod |grep -v '^module' | sed 's;.*\(github.com\/networkservicemesh\/[a-zA-z\/]*\).*;\1;g' | sort -u);do
Expand All @@ -108,7 +108,7 @@ jobs:
name: check go.mod and go.sum
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.13.4
Expand All @@ -121,7 +121,7 @@ jobs:
name: license header check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.13.4
Expand All @@ -136,7 +136,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Exclude replace in go.mod
run: |
grep ^replace go.mod || exit 0
Expand Down
2 changes: 1 addition & 1 deletion domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestDomain_ContainsShouldWorkFast(t *testing.T) {
for i := 0; i < 10000; i++ {
require.True(t, d.Contains(samples[i]))
}
require.True(t, time.Since(start) < time.Second/5)
require.True(t, time.Since(start) < time.Second/4)
}

func TestDomainFewEntries(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down
2 changes: 1 addition & 1 deletion setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func parseProtocol(f *Fanout, c *caddyfile.Dispenser) error {
return c.ArgErr()
}
net := strings.ToLower(c.Val())
if net != tcp && net != "udp" && net != tcptlc {
if net != tcp && net != udp && net != tcptlc {
return errors.New("unknown network protocol")
}
f.net = net
Expand Down
7 changes: 3 additions & 4 deletions transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,12 @@ func (t *transportImpl) Dial(ctx context.Context, network string) (*dns.Conn, er
network = tcptlc
}
if network == tcptlc {
t.dial(ctx, dns.Client{Net: network, Dialer: &net.Dialer{Timeout: maxTimeout}, TLSConfig: t.tlsConfig})

return t.dial(ctx, &dns.Client{Net: network, Dialer: &net.Dialer{Timeout: maxTimeout}, TLSConfig: t.tlsConfig})
}
return t.dial(ctx, dns.Client{Net: network, Dialer: &net.Dialer{Timeout: maxTimeout}})
return t.dial(ctx, &dns.Client{Net: network, Dialer: &net.Dialer{Timeout: maxTimeout}})
}

func (t *transportImpl) dial(ctx context.Context, c dns.Client) (*dns.Conn, error) {
func (t *transportImpl) dial(ctx context.Context, c *dns.Client) (*dns.Conn, error) {
var d net.Dialer
if c.Dialer == nil {
d = net.Dialer{Timeout: maxTimeout}
Expand Down

0 comments on commit 86c796c

Please sign in to comment.