Skip to content

Commit 970b805

Browse files
committed
Fix tests on memcached_current_connections
Depending on the version of memcached that is used for testing, the value of memcached_current_connections varies. This change only checks that memcached_current_connections metric is returned by the exporter but it doesn't assert its value. Signed-off-by: Simon Pasquier <[email protected]>
1 parent f72561d commit 970b805

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ OUTER:
9797
}
9898

9999
tests := []string{
100+
// memcached_current_connections varies depending on memcached versions
101+
// so it isn't practical to check for an exact value.
102+
`memcached_current_connections `,
100103
`memcached_up 1`,
101104
`memcached_commands_total{command="get",status="hit"} 2`,
102105
`memcached_commands_total{command="get",status="miss"} 1`,
103106
`memcached_commands_total{command="set",status="hit"} 3`,
104107
`memcached_commands_total{command="cas",status="hit"} 1`,
105108
`memcached_current_bytes 262`,
106-
`memcached_current_connections 11`,
107109
`memcached_max_connections 1024`,
108110
`memcached_current_items 2`,
109111
`memcached_items_total 4`,

0 commit comments

Comments
 (0)