rgw/admin: Extend the testing of buildQueryPath
Only one of the two code paths of buildQueryPath was tested so far.
This makes the test harness tight by testing the second one (where
the path already contains a query parameter).
@@ -18,6 +18,9 @@ func getDefaultValue() url.Values {
func TestBuildQueryPath(t *testing.T) {
queryPath := buildQueryPath("http://192.168.0.1", "/user", getDefaultValue().Encode())
assert.Equal(t, "http://192.168.0.1/admin/user?format=json", queryPath)
+
+ queryPath = buildQueryPath("http://192.168.0.1", "/user?foo", getDefaultValue().Encode())
+ assert.Equal(t, "http://192.168.0.1/admin/user?foo&format=json", queryPath)
}
func TestValueToURLParams(t *testing.T) {
