Skip to content

Commit

Permalink
remove unused tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac committed Oct 5, 2024
1 parent d784bb2 commit 623be83
Showing 1 changed file with 0 additions and 148 deletions.
148 changes: 0 additions & 148 deletions example/codegen/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1624,25 +1624,6 @@ func TestQueries(t *testing.T) {
}`,
errorMsg: "the selection field type must be object",
},
{
name: "getBool",
status: http.StatusOK,
body: `{
"collection": "getBool",
"arguments": {},
"query": {
"fields": {
"__value": {
"type": "column",
"column": "__value",
"fields": null
}
}
},
"collection_relationships": {}
}`,
response: `true`,
},
{
name: "getArticles_failure_object",
status: http.StatusUnprocessableEntity,
Expand All @@ -1668,45 +1649,6 @@ func TestQueries(t *testing.T) {
}`,
errorMsg: "the selection field type must be array",
},
{
name: "getArticles_success",
status: http.StatusOK,
body: `{
"collection": "getArticles",
"query": {
"fields": {
"__value": {
"type": "column",
"column": "__value",
"fields": {
"type": "array",
"fields": {
"type": "object",
"fields": {
"id": { "type": "column", "column": "id" }
}
}
}
}
}
},
"arguments": {
"name": {
"type": "literal",
"value": "foo"
},
"Limit": {
"type": "literal",
"value": 1
},
"AuthorID": { "type": "literal", "value": 1 }
},
"collection_relationships": {}
}`,
response: `[{
"id": 1
}]`,
},
}

testServer := createTestServer(t).BuildTestServer()
Expand Down Expand Up @@ -1750,40 +1692,6 @@ func TestProcedures(t *testing.T) {
response string
errorMsg string
}{
{
name: "create_article_success",
status: http.StatusOK,
body: `{
"operations": [
{
"type": "procedure",
"name": "create_article",
"arguments": {
"author": {
"type": "literal",
"value": {
"created_at": "2024-03-31T12:01:32+07:00",
"id": "5ea23c2a-f75b-4901-a640-87a46a509418"
}
}
},
"fields": {
"type": "object",
"fields": {
"id": {
"type": "column",
"column": "id"
}
}
}
}
],
"collection_relationships": {}
}`,
response: `{
"id": 1
}`,
},
{
name: "create_article_array_400",
status: http.StatusUnprocessableEntity,
Expand Down Expand Up @@ -1811,46 +1719,6 @@ func TestProcedures(t *testing.T) {
}`,
errorMsg: "the selection field type must be object",
},
{
name: "createAuthors_success",
status: http.StatusOK,
body: `{
"operations": [
{
"type": "procedure",
"name": "createAuthors",
"arguments": {
"Authors": [
{
"name": "Author 1"
},
{
"name": "Author 2"
}
]
},
"fields": {
"type": "array",
"fields": {
"type": "object",
"fields": {
"id": {
"type": "column",
"column": "id"
}
}
}
}
}
],
"collection_relationships": {}
}`,
response: `[{
"id": 0
}, {
"id": 1
}]`,
},
{
name: "createAuthors_object_422",
status: http.StatusUnprocessableEntity,
Expand All @@ -1875,22 +1743,6 @@ func TestProcedures(t *testing.T) {
}`,
errorMsg: "the selection field type must be array",
},
{
name: "increase_success",
status: http.StatusOK,
body: `{
"operations": [
{
"type": "procedure",
"name": "increase",
"arguments": {},
"fields": null
}
],
"collection_relationships": {}
}`,
response: `1`,
},
{
name: "increase_422",
status: http.StatusUnprocessableEntity,
Expand Down

0 comments on commit 623be83

Please sign in to comment.