MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / TestKind_JSONSchemaExtend

Function TestKind_JSONSchemaExtend

cli/internal/specs/v0/kind_test.go:28–61  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestKind_JSONSchemaExtend(t *testing.T) {
29 data, err := jsonschema.Generate(new(Kind))
30 require.NoError(t, err)
31 jsonschema.TestJSONSchema(t, string(data), []jsonschema.TestCase{
32 {
33 Name: "empty",
34 Err: true,
35 Spec: `""`,
36 },
37 {
38 Name: "null",
39 Err: true,
40 Spec: `null`,
41 },
42 {
43 Name: "bad type",
44 Err: true,
45 Spec: `123`,
46 },
47 {
48 Name: "bad value",
49 Err: true,
50 Spec: `"extra"`,
51 },
52 {
53 Name: "source",
54 Spec: `"source"`,
55 },
56 {
57 Name: "destination",
58 Spec: `"destination"`,
59 },
60 })
61}

Callers

nothing calls this directly

Calls 1

GenerateMethod · 0.80

Tested by

no test coverage detected