mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
Bartek's suggestions
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
This commit is contained in:
parent
f9db320e5a
commit
3d74fcfa6a
|
@ -60,18 +60,14 @@ func TestDeriv(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFunctionList(t *testing.T) {
|
func TestFunctionList(t *testing.T) {
|
||||||
// Test that Functions and parser.Functions list the same functions
|
// Test that Functions and parser.Functions list the same functions.
|
||||||
for i := range FunctionCalls {
|
for i := range FunctionCalls {
|
||||||
_, ok := parser.Functions[i]
|
_, ok := parser.Functions[i]
|
||||||
if !ok {
|
testutil.Assert(t, ok, fmt.Sprintf("function %s exists in promql package, but not in parser package", i))
|
||||||
panic(fmt.Sprintf("function %s exists in promql package, but not in parser package", i))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := range parser.Functions {
|
for i := range parser.Functions {
|
||||||
_, ok := FunctionCalls[i]
|
_, ok := FunctionCalls[i]
|
||||||
if !ok {
|
testutil.Assert(t, ok, (fmt.Sprintf("function %s exists in parser package, but not in promql package", i)))
|
||||||
panic(fmt.Sprintf("function %s exists in parser package, but not in promql package", i))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue