(t *testing.T, r *http.Request)
| 186 | } |
| 187 | |
| 188 | func checkCreateAddonVersionRequest(t *testing.T, r *http.Request) { |
| 189 | t.Helper() |
| 190 | |
| 191 | body, err := io.ReadAll(r.Body) |
| 192 | if err != nil { |
| 193 | t.Fatal(err) |
| 194 | } |
| 195 | got := map[string]any{} |
| 196 | err = json.Unmarshal(body, &got) |
| 197 | if err != nil { |
| 198 | t.Fatal(err) |
| 199 | } |
| 200 | want := map[string]any{ |
| 201 | "addon_deps": []any{}, |
| 202 | "checksum": "b537240431bb4868264e48a8c646ebd3a9e355140d27d7fe559b5cbfd3ce6f31", |
| 203 | "doc": "# Test Addon README", |
| 204 | "message": "# Test Addon Changelog", |
| 205 | "plugin_deps": []any{"cloudquery/source/test@v1.0.0"}, |
| 206 | } |
| 207 | if diff := cmp.Diff(want, got); diff != "" { |
| 208 | t.Fatalf("mismatch (-want +got):\n%s", diff) |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | func checkUpdateAddonVersionRequest(t *testing.T, r *http.Request) { |
| 213 | t.Helper() |
no outgoing calls
no test coverage detected