Update make static-assets goal and run format

This commit is contained in:
Kyle Havlovitz 2018-04-13 09:57:25 -07:00
parent 58da0bc7dc
commit af4be34a2a
No known key found for this signature in database
GPG Key ID: 8A5E6B173056AD6C
8 changed files with 76 additions and 78 deletions

View File

@ -122,7 +122,7 @@ ui:
# changes to the UI assets that aren't checked in.
static-assets:
@go-bindata-assetfs -pkg agent -prefix pkg ./pkg/web_ui/...
@mv bindata_assetfs.go agent/
@mv bindata.go agent/bindata_assetfs.go
$(MAKE) format
tools:

View File

@ -917,7 +917,7 @@ func (d *DNSServer) serviceLookup(network, datacenter, service, tag string, req,
}
}
func ednsSubnetForRequest(req *dns.Msg) (*dns.EDNS0_SUBNET) {
func ednsSubnetForRequest(req *dns.Msg) *dns.EDNS0_SUBNET {
// IsEdns0 returns the EDNS RR if present or nil otherwise
edns := req.IsEdns0()
@ -931,7 +931,7 @@ func ednsSubnetForRequest(req *dns.Msg) (*dns.EDNS0_SUBNET) {
}
}
return nil;
return nil
}
// preparedQueryLookup is used to handle a prepared query.

View File

@ -9,15 +9,15 @@ import (
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/hashicorp/consul/agent/config"
"github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/lib"
"github.com/hashicorp/consul/testutil/retry"
"github.com/hashicorp/serf/coordinate"
"github.com/miekg/dns"
"github.com/pascaldekloe/goe/verify"
"github.com/hashicorp/serf/coordinate"
"github.com/stretchr/testify/require"
)
const (
@ -1844,9 +1844,9 @@ func TestDNS_PreparedQueryNearIPEDNS(t *testing.T) {
address string
coord *coordinate.Coordinate
}{
{"foo1", "198.18.0.1", lib.GenerateCoordinate(1 * time.Millisecond),},
{"foo2", "198.18.0.2", lib.GenerateCoordinate(10 * time.Millisecond),},
{"foo3", "198.18.0.3", lib.GenerateCoordinate(30 * time.Millisecond),},
{"foo1", "198.18.0.1", lib.GenerateCoordinate(1 * time.Millisecond)},
{"foo2", "198.18.0.2", lib.GenerateCoordinate(10 * time.Millisecond)},
{"foo3", "198.18.0.3", lib.GenerateCoordinate(30 * time.Millisecond)},
}
t.Parallel()
@ -1970,9 +1970,9 @@ func TestDNS_PreparedQueryNearIP(t *testing.T) {
address string
coord *coordinate.Coordinate
}{
{"foo1", "198.18.0.1", lib.GenerateCoordinate(1 * time.Millisecond),},
{"foo2", "198.18.0.2", lib.GenerateCoordinate(10 * time.Millisecond),},
{"foo3", "198.18.0.3", lib.GenerateCoordinate(30 * time.Millisecond),},
{"foo1", "198.18.0.1", lib.GenerateCoordinate(1 * time.Millisecond)},
{"foo2", "198.18.0.2", lib.GenerateCoordinate(10 * time.Millisecond)},
{"foo3", "198.18.0.3", lib.GenerateCoordinate(30 * time.Millisecond)},
}
t.Parallel()

View File

@ -12,12 +12,12 @@ import (
"strings"
"time"
"github.com/NYTimes/gziphandler"
"github.com/armon/go-metrics"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/go-cleanhttp"
"github.com/mitchellh/mapstructure"
"github.com/NYTimes/gziphandler"
)
// MethodNotAllowedError should be returned by a handler when the HTTP method is not allowed.
@ -521,7 +521,6 @@ func sourceAddrFromRequest(req *http.Request) string {
}
}
// parseSource is used to parse the ?near=<node> query parameter, used for
// sorting by RTT based on a source node. We set the source's DC to the target
// DC in the request, if given, or else the agent's DC.

View File

@ -7,9 +7,9 @@ import (
"strings"
"testing"
require "github.com/stretchr/testify/require"
"github.com/hashicorp/consul/testutil"
"github.com/mitchellh/cli"
require "github.com/stretchr/testify/require"
)
func TestValidateCommand_noTabs(t *testing.T) {
@ -72,7 +72,6 @@ func TestValidateCommand_SucceedWithMinimalHCLConfigFormat(t *testing.T) {
err := ioutil.WriteFile(fp, []byte("bind_addr = \"10.0.0.1\"\ndata_dir = \""+td+"\""), 0644)
require.Nilf(t, err, "err: %s", err)
cmd := New(cli.NewMockUi())
args := []string{"--config-format", "hcl", fp}