diff --git a/Makefile b/Makefile index 090c31482..7591d243d 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ tag: git push --tags $(BUILD_PATH)/cache/$(GOPKG): - curl -o $@ $(GOURL)/$(GOPKG) + curl -o $@ -L $(GOURL)/$(GOPKG) benchmark: test $(GO) test $(GO_TEST_FLAGS) -test.bench='Benchmark' ./... diff --git a/Makefile.INCLUDE b/Makefile.INCLUDE index 22ddf6c84..58d802bba 100644 --- a/Makefile.INCLUDE +++ b/Makefile.INCLUDE @@ -34,7 +34,7 @@ MAC_OS_X_VERSION ?= 10.8 BUILD_PATH = $(PWD)/.build -GO_VERSION := 1.2.1 +GO_VERSION := 1.3 GOOS = $(subst Darwin,darwin,$(subst Linux,linux,$(OS))) ifeq ($(GOOS),darwin) @@ -45,7 +45,7 @@ endif GOARCH = $(subst x86_64,amd64,$(ARCH)) GOPKG ?= go$(GO_VERSION).$(GOOS)-$(GOARCH)$(RELEASE_SUFFIX).tar.gz -GOURL ?= http://go.googlecode.com/files +GOURL ?= http://golang.org/dl GOROOT = $(BUILD_PATH)/root/go GOPATH = $(BUILD_PATH)/root/gopath GOCC = $(GOROOT)/bin/go diff --git a/storage/metric/tiered/end_to_end_test.go b/storage/metric/tiered/end_to_end_test.go index 40a1ff10f..a321d0883 100644 --- a/storage/metric/tiered/end_to_end_test.go +++ b/storage/metric/tiered/end_to_end_test.go @@ -189,8 +189,15 @@ func GetLabelValuesForLabelNameTests(p metric.Persistence, t testing.TB) { t.Fatalf("Number of values don't match for label %s: got %d; want %d", name, len(actual), len(expected)) } for i := range expected { - if actual[i] != expected[i] { - t.Fatalf("%d. Got %s; want %s", i, actual[i], expected[i]) + inActual := false + for _, a := range actual { + if expected[i] == a { + inActual = true + break + } + } + if !inActual { + t.Fatalf("%d. Expected label value %s not in output", i, expected[i]) } } } diff --git a/templates/templates_test.go b/templates/templates_test.go index 5aff1d860..c8aa8ce2f 100644 --- a/templates/templates_test.go +++ b/templates/templates_test.go @@ -74,8 +74,8 @@ func TestTemplateExpansion(t *testing.T) { output: "a", }, { - // Range over query. - text: "{{ range query \"metric\" }}{{.Labels.instance}}:{{.Value}}: {{end}}", + // Range over query and sort by label. + text: "{{ range query \"metric\" | sortByLabel \"instance\" }}{{.Labels.instance}}:{{.Value}}: {{end}}", output: "a:11: b:21: ", }, { @@ -98,11 +98,6 @@ func TestTemplateExpansion(t *testing.T) { text: "{{ reReplaceAll \"(a)b\" \"x$1\" \"ab\" }}", output: "xa", }, - { - // Sorting. - text: "{{ range query \"metric\" | sortByLabel \"instance\" }}{{.Labels.instance}} {{end}}", - output: "a b ", - }, { // Humanize. text: "{{ range . }}{{ humanize . }}:{{ end }}",