mirror of
https://github.com/prometheus/prometheus
synced 2024-12-28 09:42:22 +00:00
Merge "Update used Go version to 1.3."
This commit is contained in:
commit
bfb64321de
2
Makefile
2
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' ./...
|
||||
|
@ -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
|
||||
|
@ -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])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 }}",
|
||||
|
Loading…
Reference in New Issue
Block a user