Skip to content

Commit

Permalink
test: Add e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jachym-tousek-keboola committed Jun 6, 2024
1 parent eb4a793 commit db94dd6
Show file tree
Hide file tree
Showing 68 changed files with 789 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@
},
{
"state": "writing",
"openedAt": "%s",
"statistics": {
"total": {
"recordsCount": 0,
"uncompressedSize": 0
},
"levels": {}
}
"openedAt": "%s"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"projectId": %%TEST_KBC_PROJECT_ID%%,
"branchId": %%TEST_DEFAULT_BRANCH_ID%%,
"page": {
"limit": 100,
"totalCount": 0,
"sinceId": "",
"lastId": ""
},
"sources": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/aggregation/sources",
"method": "GET",
"headers": {
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
202
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-1/%s",
"type": "api.create.source",
"url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-1/%s",
"status": "processing",
"isFinished": false,
"createdAt": "%s"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"path": "/v1/branches/default/sources",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"body": {
"name": "My Source 1",
"type": "http"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
202
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-2/%s",
"type": "api.create.source",
"url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-2/%s",
"status": "processing",
"isFinished": false,
"createdAt": "%s"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"path": "/v1/branches/default/sources",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"body": {
"name": "My Source 2",
"type": "http"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
202
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-3/%s",
"type": "api.create.source",
"url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-3/%s",
"status": "processing",
"isFinished": false,
"createdAt": "%s"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"path": "/v1/branches/default/sources",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"body": {
"name": "My Source 3",
"type": "http"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
202
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-4/%s",
"type": "api.create.source",
"url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-4/%s",
"status": "processing",
"isFinished": false,
"createdAt": "%s"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"path": "/v1/branches/default/sources",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"body": {
"name": "My Source 4",
"type": "http"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
202
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-5/%s",
"type": "api.create.source",
"url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source-5/%s",
"status": "processing",
"isFinished": false,
"createdAt": "%s"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"path": "/v1/branches/default/sources",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"body": {
"name": "My Source 5",
"type": "http"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
%A
"status": "success",
%A
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "<<001-create-source-1:response.url>>",
"method": "GET",
"headers": {
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"repeat": {
"until": "status != 'processing'",
"timeout": 60
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
%A
"status": "success",
%A
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "<<001-create-source-2:response.url>>",
"method": "GET",
"headers": {
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"repeat": {
"until": "status != 'processing'",
"timeout": 60
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
%A
"status": "success",
%A
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "<<001-create-source-3:response.url>>",
"method": "GET",
"headers": {
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"repeat": {
"until": "status != 'processing'",
"timeout": 60
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
%A
"status": "success",
%A
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "<<001-create-source-4:response.url>>",
"method": "GET",
"headers": {
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"repeat": {
"until": "status != 'processing'",
"timeout": 60
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
%A
"status": "success",
%A
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "<<001-create-source-5:response.url>>",
"method": "GET",
"headers": {
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"repeat": {
"until": "status != 'processing'",
"timeout": 60
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
202
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source-1/my-sink-1/%s",
"type": "api.create.sink",
"url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source-1/my-sink-1/%s",
"status": "processing",
"isFinished": false,
"createdAt": "%s"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"path": "/v1/branches/default/sources/my-source-1/sinks",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"body": {
"sinkId": "my-sink-1",
"name": "My Sink",
"type": "table",
"table": {
"type": "keboola",
"tableId": "in.c-my-bucket.my-table",
"mapping": {
"columns": [
{
"type": "uuid-v7",
"name": "id",
"primaryKey": true
},
{
"type": "body",
"name": "body"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
%A
"status": "success",
%A
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "<<003-create-sink-1:response.url>>",
"method": "GET",
"headers": {
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"repeat": {
"until": "status != 'processing'",
"timeout": 60
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
202
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source-1/my-sink-2/%s",
"type": "api.create.sink",
"url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source-1/my-sink-2/%s",
"status": "processing",
"isFinished": false,
"createdAt": "%s"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"path": "/v1/branches/default/sources/my-source-1/sinks",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"body": {
"sinkId": "my-sink-2",
"name": "My Sink",
"type": "table",
"table": {
"type": "keboola",
"tableId": "in.c-my-bucket.my-table",
"mapping": {
"columns": [
{
"type": "uuid-v7",
"name": "id",
"primaryKey": true
},
{
"type": "body",
"name": "body"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
%A
"status": "success",
%A
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "<<004-create-sink-2:response.url>>",
"method": "GET",
"headers": {
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
},
"repeat": {
"until": "status != 'processing'",
"timeout": 60
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
200
Loading

0 comments on commit db94dd6

Please sign in to comment.