MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / checkCreatePluginVersionRequest

Function checkCreatePluginVersionRequest

cli/cmd/plugin_publish_test.go:362–386  ·  view source on GitHub ↗
(t *testing.T, r *http.Request)

Source from the content-addressed store, hash-verified

360}
361
362func checkCreatePluginVersionRequest(t *testing.T, r *http.Request) {
363 t.Helper()
364
365 body, err := io.ReadAll(r.Body)
366 if err != nil {
367 t.Fatal(err)
368 }
369 got := map[string]any{}
370 err = json.Unmarshal(body, &got)
371 if err != nil {
372 t.Fatal(err)
373 }
374 want := map[string]any{
375 "message": "## This is a subtitle\n\nThis is a paragraph.\n",
376 "package_type": "native",
377 "protocols": []any{float64(3)},
378 "supported_targets": []any{
379 "linux_amd64", "darwin_amd64",
380 },
381 "checksums": []any{"1234567890", "1234567890"},
382 }
383 if diff := cmp.Diff(want, got); diff != "" {
384 t.Fatalf("mismatch (-want +got):\n%s", diff)
385 }
386}
387
388func checkUpdatePluginVersionRequest(t *testing.T, r *http.Request) {
389 t.Helper()

Callers 3

TestPluginPublishFunction · 0.85
TestPluginPublishWithUIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected