From 5ed01f8c1281d88ba98afeb617351916d7d2255d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Va=C5=A1ko?= <Matovidlo2@gmail.com>
Date: Wed, 24 Jul 2024 20:27:37 +0200
Subject: [PATCH 1/4] tests: Add failing tests

---
 .../001-create-source/expected-http-code      |  1 +
 .../001-create-source/expected-response.json  |  8 ++
 .../001-create-source/request.json            | 12 +++
 .../002-poll-source/expected-http-code        |  1 +
 .../002-poll-source/expected-response.json    |  5 +
 .../002-poll-source/request.json              | 11 +++
 .../003-create-sink-1/expected-http-code      |  1 +
 .../003-create-sink-1/expected-response.json  |  8 ++
 .../003-create-sink-1/request.json            | 29 ++++++
 .../003-create-sink-2/expected-http-code      |  1 +
 .../003-create-sink-2/expected-response.json  |  8 ++
 .../003-create-sink-2/request.json            | 29 ++++++
 .../003-create-sink-3/expected-http-code      |  1 +
 .../003-create-sink-3/expected-response.json  |  8 ++
 .../003-create-sink-3/request.json            | 29 ++++++
 .../003-create-sink-4/expected-http-code      |  1 +
 .../003-create-sink-4/expected-response.json  |  8 ++
 .../003-create-sink-4/request.json            | 29 ++++++
 .../003-create-sink-5/expected-http-code      |  1 +
 .../003-create-sink-5/expected-response.json  |  8 ++
 .../003-create-sink-5/request.json            | 29 ++++++
 .../004-create-sink-1-wait/expected-http-code |  1 +
 .../expected-response.json                    |  5 +
 .../004-create-sink-1-wait/request.json       | 11 +++
 .../004-create-sink-2-wait/expected-http-code |  1 +
 .../expected-response.json                    |  5 +
 .../004-create-sink-2-wait/request.json       | 11 +++
 .../004-create-sink-3-wait/expected-http-code |  1 +
 .../expected-response.json                    |  5 +
 .../004-create-sink-3-wait/request.json       | 11 +++
 .../004-create-sink-4-wait/expected-http-code |  1 +
 .../expected-response.json                    |  5 +
 .../004-create-sink-4-wait/request.json       | 11 +++
 .../004-create-sink-5-wait/expected-http-code |  1 +
 .../expected-response.json                    |  5 +
 .../004-create-sink-5-wait/request.json       | 11 +++
 .../expected-http-code                        |  1 +
 .../expected-response.json                    | 91 +++++++++++++++++++
 .../request.json                              |  7 ++
 .../expected-http-code                        |  1 +
 .../expected-response.json                    | 27 ++++++
 .../006-list-limit-2-page-001/request.json    |  7 ++
 .../expected-http-code                        |  1 +
 .../expected-response.json                    | 27 ++++++
 .../007-list-limit-2-page-002/request.json    |  7 ++
 .../expected-http-code                        |  1 +
 .../expected-response.json                    | 20 ++++
 .../008-list-limit-2-page-003/request.json    |  7 ++
 .../expected-http-code                        |  1 +
 .../expected-response.json                    | 12 +++
 .../009-list-limit-2-page-004/request.json    |  7 ++
 .../expected-http-code                        |  1 +
 .../expected-response.json                    | 12 +++
 .../request.json                              |  7 ++
 54 files changed, 550 insertions(+)
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/request.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-http-code
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-response.json
 create mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/request.json

diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-http-code
new file mode 100644
index 0000000000..8f897c857d
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-http-code
@@ -0,0 +1 @@
+202
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-response.json
new file mode 100644
index 0000000000..1e07d5213f
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-response.json
@@ -0,0 +1,8 @@
+{
+  "taskId": "api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s",
+  "type": "api.create.source",
+  "url": "https://stream.keboola.local/v1/tasks/api.create.source/%%TEST_DEFAULT_BRANCH_ID%%/my-source/%s",
+  "status": "processing",
+  "isFinished": false,
+  "createdAt": "%s"
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/request.json
new file mode 100644
index 0000000000..74ea7dc6c0
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/request.json
@@ -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",
+    "type": "http"
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-response.json
new file mode 100644
index 0000000000..6a86c1329a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-response.json
@@ -0,0 +1,5 @@
+{
+%A
+  "status": "success",
+%A
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/request.json
new file mode 100644
index 0000000000..59eb032876
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/request.json
@@ -0,0 +1,11 @@
+{
+  "path": "<<001-create-source:response.url>>",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "repeat": {
+    "until": "status != 'processing'",
+    "timeout": 60
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-http-code
new file mode 100644
index 0000000000..8f897c857d
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-http-code
@@ -0,0 +1 @@
+202
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-response.json
new file mode 100644
index 0000000000..12784f66e9
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-response.json
@@ -0,0 +1,8 @@
+{
+  "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-1/%s",
+  "type": "api.create.sink",
+  "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-1/%s",
+  "status": "processing",
+  "isFinished": false,
+  "createdAt": "%s"
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/request.json
new file mode 100644
index 0000000000..c68fcc5a18
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/request.json
@@ -0,0 +1,29 @@
+{
+  "path": "/v1/branches/default/sources/my-source/sinks",
+  "method": "POST",
+  "headers": {
+    "Content-Type": "application/json",
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "body": {
+    "name": "My Sink 1",
+    "type": "table",
+    "table": {
+      "type": "keboola",
+      "tableId": "in.c-my-bucket.my-table-1",
+      "mapping": {
+        "columns": [
+          {
+            "type": "uuid",
+            "name": "id",
+            "primaryKey": true
+          },
+          {
+            "type": "body",
+            "name": "body"
+          }
+        ]
+      }
+    }
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-http-code
new file mode 100644
index 0000000000..8f897c857d
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-http-code
@@ -0,0 +1 @@
+202
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-response.json
new file mode 100644
index 0000000000..87d71c8784
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-response.json
@@ -0,0 +1,8 @@
+{
+  "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-2/%s",
+  "type": "api.create.sink",
+  "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-2/%s",
+  "status": "processing",
+  "isFinished": false,
+  "createdAt": "%s"
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/request.json
new file mode 100644
index 0000000000..a53d0ad969
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/request.json
@@ -0,0 +1,29 @@
+{
+  "path": "/v1/branches/default/sources/my-source/sinks",
+  "method": "POST",
+  "headers": {
+    "Content-Type": "application/json",
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "body": {
+    "name": "My Sink 2",
+    "type": "table",
+    "table": {
+      "type": "keboola",
+      "tableId": "in.c-my-bucket.my-table-2",
+      "mapping": {
+        "columns": [
+          {
+            "type": "uuid",
+            "name": "id",
+            "primaryKey": true
+          },
+          {
+            "type": "body",
+            "name": "body"
+          }
+        ]
+      }
+    }
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-http-code
new file mode 100644
index 0000000000..8f897c857d
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-http-code
@@ -0,0 +1 @@
+202
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-response.json
new file mode 100644
index 0000000000..d141040d8c
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-response.json
@@ -0,0 +1,8 @@
+{
+  "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-3/%s",
+  "type": "api.create.sink",
+  "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-3/%s",
+  "status": "processing",
+  "isFinished": false,
+  "createdAt": "%s"
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/request.json
new file mode 100644
index 0000000000..41d58fc05a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/request.json
@@ -0,0 +1,29 @@
+{
+  "path": "/v1/branches/default/sources/my-source/sinks",
+  "method": "POST",
+  "headers": {
+    "Content-Type": "application/json",
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "body": {
+    "name": "My Sink 3",
+    "type": "table",
+    "table": {
+      "type": "keboola",
+      "tableId": "in.c-my-bucket.my-table-3",
+      "mapping": {
+        "columns": [
+          {
+            "type": "uuid",
+            "name": "id",
+            "primaryKey": true
+          },
+          {
+            "type": "body",
+            "name": "body"
+          }
+        ]
+      }
+    }
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-http-code
new file mode 100644
index 0000000000..8f897c857d
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-http-code
@@ -0,0 +1 @@
+202
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-response.json
new file mode 100644
index 0000000000..40f66d7c2c
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-response.json
@@ -0,0 +1,8 @@
+{
+  "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-4/%s",
+  "type": "api.create.sink",
+  "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-4/%s",
+  "status": "processing",
+  "isFinished": false,
+  "createdAt": "%s"
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/request.json
new file mode 100644
index 0000000000..5ce6489093
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/request.json
@@ -0,0 +1,29 @@
+{
+  "path": "/v1/branches/default/sources/my-source/sinks",
+  "method": "POST",
+  "headers": {
+    "Content-Type": "application/json",
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "body": {
+    "name": "My Sink 4",
+    "type": "table",
+    "table": {
+      "type": "keboola",
+      "tableId": "in.c-my-bucket.my-table-4",
+      "mapping": {
+        "columns": [
+          {
+            "type": "uuid",
+            "name": "id",
+            "primaryKey": true
+          },
+          {
+            "type": "body",
+            "name": "body"
+          }
+        ]
+      }
+    }
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-http-code
new file mode 100644
index 0000000000..8f897c857d
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-http-code
@@ -0,0 +1 @@
+202
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-response.json
new file mode 100644
index 0000000000..dbe2db9598
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-response.json
@@ -0,0 +1,8 @@
+{
+  "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-5/%s",
+  "type": "api.create.sink",
+  "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-5/%s",
+  "status": "processing",
+  "isFinished": false,
+  "createdAt": "%s"
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/request.json
new file mode 100644
index 0000000000..f374759f76
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/request.json
@@ -0,0 +1,29 @@
+{
+  "path": "/v1/branches/default/sources/my-source/sinks",
+  "method": "POST",
+  "headers": {
+    "Content-Type": "application/json",
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "body": {
+    "name": "My Sink 5",
+    "type": "table",
+    "table": {
+      "type": "keboola",
+      "tableId": "in.c-my-bucket.my-table-5",
+      "mapping": {
+        "columns": [
+          {
+            "type": "uuid",
+            "name": "id",
+            "primaryKey": true
+          },
+          {
+            "type": "body",
+            "name": "body"
+          }
+        ]
+      }
+    }
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-response.json
new file mode 100644
index 0000000000..6a86c1329a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-response.json
@@ -0,0 +1,5 @@
+{
+%A
+  "status": "success",
+%A
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/request.json
new file mode 100644
index 0000000000..05feab7309
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/request.json
@@ -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": 120
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-response.json
new file mode 100644
index 0000000000..6a86c1329a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-response.json
@@ -0,0 +1,5 @@
+{
+%A
+  "status": "success",
+%A
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/request.json
new file mode 100644
index 0000000000..d7ed84351c
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/request.json
@@ -0,0 +1,11 @@
+{
+  "path": "<<003-create-sink-2:response.url>>",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "repeat": {
+    "until": "status != 'processing'",
+    "timeout": 120
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-response.json
new file mode 100644
index 0000000000..6a86c1329a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-response.json
@@ -0,0 +1,5 @@
+{
+%A
+  "status": "success",
+%A
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/request.json
new file mode 100644
index 0000000000..d3a8b84def
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/request.json
@@ -0,0 +1,11 @@
+{
+  "path": "<<003-create-sink-3:response.url>>",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "repeat": {
+    "until": "status != 'processing'",
+    "timeout": 120
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-response.json
new file mode 100644
index 0000000000..6a86c1329a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-response.json
@@ -0,0 +1,5 @@
+{
+%A
+  "status": "success",
+%A
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/request.json
new file mode 100644
index 0000000000..6ea8338a80
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/request.json
@@ -0,0 +1,11 @@
+{
+  "path": "<<003-create-sink-4:response.url>>",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "repeat": {
+    "until": "status != 'processing'",
+    "timeout": 120
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-response.json
new file mode 100644
index 0000000000..6a86c1329a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-response.json
@@ -0,0 +1,5 @@
+{
+%A
+  "status": "success",
+%A
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/request.json
new file mode 100644
index 0000000000..555095bbbc
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/request.json
@@ -0,0 +1,11 @@
+{
+  "path": "<<003-create-sink-5:response.url>>",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  },
+  "repeat": {
+    "until": "status != 'processing'",
+    "timeout": 120
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-response.json
new file mode 100644
index 0000000000..210559521d
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-response.json
@@ -0,0 +1,91 @@
+{
+  "projectId": %%TEST_KBC_PROJECT_ID%%,
+  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+  "sourceId": "my-source",
+  "page": {
+    "limit": 100,
+    "totalCount": 5,
+    "afterId": "",
+    "lastId": "my-sink-5"
+  },
+  "sinks": [
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-1",
+      "type": "table",
+      "name": "My Sink 1",
+      "description": "",
+      "table": {
+        "type": "keboola",
+        "tableId": "in.c-my-bucket.my-table-1",
+        "mapping": {
+          "columns": [
+            {
+              "primaryKey": true,
+              "type": "uuid-v7",
+              "name": "id"
+            },
+            {
+              "primaryKey": false,
+              "type": "body",
+              "name": "body"
+            }
+          ]
+        }
+      },
+      "version": {
+        "number": 1,
+        "hash": "%s",
+        "description": "New sink.",
+        "at": "%s",
+        "by": {
+          "type": "user",
+          "tokenId": "%s",
+          "tokenDesc": "%s",
+          "userId": "%s",
+          "userName": "%s"
+        }
+      },
+      "created": {
+        "at": "%s",
+        "by": {
+          "type": "user",
+          "tokenId": "%s",
+          "tokenDesc": "%s",
+          "userId": "%s",
+          "userName": "%s"
+        }
+      }
+    },
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-2",
+      %A
+    },
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-3",
+      %A
+    },
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-4",
+      %A
+    },
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-5",
+      %A
+    }
+  ]
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/request.json
new file mode 100644
index 0000000000..14a10edd61
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/request.json
@@ -0,0 +1,7 @@
+{
+  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-response.json
new file mode 100644
index 0000000000..dbd39dcc0a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-response.json
@@ -0,0 +1,27 @@
+{
+  "projectId": %%TEST_KBC_PROJECT_ID%%,
+  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+  "sourceId": "my-source",
+  "page": {
+    "limit": 2,
+    "totalCount": 5,
+    "afterId": "",
+    "lastId": "my-sink-2"
+  },
+  "sinks": [
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-1",
+      %A
+    },
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-2",
+      %A
+    }
+  ]
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/request.json
new file mode 100644
index 0000000000..1bbdd79c37
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/request.json
@@ -0,0 +1,7 @@
+{
+  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?limit=2",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-response.json
new file mode 100644
index 0000000000..51bf94bacc
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-response.json
@@ -0,0 +1,27 @@
+{
+  "projectId": %%TEST_KBC_PROJECT_ID%%,
+  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+  "sourceId": "my-source",
+  "page": {
+    "limit": 2,
+    "totalCount": 5,
+    "afterId": "my-sink-2",
+    "lastId": "my-sink-4"
+  },
+  "sinks": [
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-3",
+      %A
+    },
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-4",
+      %A
+    }
+  ]
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/request.json
new file mode 100644
index 0000000000..82f5bec649
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/request.json
@@ -0,0 +1,7 @@
+{
+  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?limit=2&afterId=my-sink-2",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-response.json
new file mode 100644
index 0000000000..7ba6d4ad51
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-response.json
@@ -0,0 +1,20 @@
+{
+  "projectId": %%TEST_KBC_PROJECT_ID%%,
+  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+  "sourceId": "my-source",
+  "page": {
+    "limit": 2,
+    "totalCount": 5,
+    "afterId": "my-sink-4",
+    "lastId": "my-sink-5"
+  },
+  "sinks": [
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-5",
+      %A
+    }
+  ]
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/request.json
new file mode 100644
index 0000000000..3681703234
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/request.json
@@ -0,0 +1,7 @@
+{
+  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?limit=2&afterId=my-sink-4",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-response.json
new file mode 100644
index 0000000000..cde02ac14d
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-response.json
@@ -0,0 +1,12 @@
+{
+  "projectId": %%TEST_KBC_PROJECT_ID%%,
+  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+  "sourceId": "my-source",
+  "page": {
+    "limit": 2,
+    "totalCount": 5,
+    "afterId": "my-sink-5",
+    "lastId": ""
+  },
+  "sinks": []
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/request.json
new file mode 100644
index 0000000000..b658dafdf0
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/request.json
@@ -0,0 +1,7 @@
+{
+  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?limit=2&afterId=my-sink-5",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  }
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-http-code
new file mode 100644
index 0000000000..08839f6bb2
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-http-code
@@ -0,0 +1 @@
+200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-response.json
new file mode 100644
index 0000000000..893a09157a
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-response.json
@@ -0,0 +1,12 @@
+{
+  "projectId": %%TEST_KBC_PROJECT_ID%%,
+  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+  "sourceId": "my-source",
+  "page": {
+    "limit": 100,
+    "totalCount": 5,
+    "afterId": "my-sink-5",
+    "lastId": ""
+  },
+  "sinks": []
+}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/request.json
new file mode 100644
index 0000000000..a2c612965c
--- /dev/null
+++ b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/request.json
@@ -0,0 +1,7 @@
+{
+  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?afterId=my-sink-5",
+  "method": "GET",
+  "headers": {
+    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
+  }
+}

From 1272427f4184754b8ce78cc79a160fb3e2deae3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Jure=C4=8Dko?= <michal.jurecko@gmail.com>
Date: Fri, 26 Jul 2024 13:44:55 +0200
Subject: [PATCH 2/4] feat: Add distributed locks to dependencies.ApiScope

---
 .../pkg/service/stream/api/service/service.go |  6 ++++++
 internal/pkg/service/stream/api/start.go      | 14 ++++---------
 internal/pkg/service/stream/components.go     | 20 +++++++++++--------
 .../pkg/service/stream/dependencies/api.go    | 13 +++++++-----
 .../stream/dependencies/dependencies.go       |  1 +
 5 files changed, 31 insertions(+), 23 deletions(-)

diff --git a/internal/pkg/service/stream/api/service/service.go b/internal/pkg/service/stream/api/service/service.go
index 9c571bde20..ca9a2e73d0 100644
--- a/internal/pkg/service/stream/api/service/service.go
+++ b/internal/pkg/service/stream/api/service/service.go
@@ -6,6 +6,8 @@ import (
 
 	"github.com/benbjohnson/clock"
 
+	"github.com/keboola/keboola-as-code/internal/pkg/log"
+	"github.com/keboola/keboola-as-code/internal/pkg/service/common/distlock"
 	"github.com/keboola/keboola-as-code/internal/pkg/service/common/task"
 	api "github.com/keboola/keboola-as-code/internal/pkg/service/stream/api/gen/stream"
 	"github.com/keboola/keboola-as-code/internal/pkg/service/stream/api/mapper"
@@ -15,18 +17,22 @@ import (
 )
 
 type service struct {
+	logger     log.Logger
 	clock      clock.Clock
 	publicURL  *url.URL
 	tasks      *task.Node
+	locks      *distlock.Provider
 	definition *definitionRepo.Repository
 	mapper     *mapper.Mapper
 }
 
 func New(d dependencies.APIScope, cfg config.Config) api.Service {
 	return &service{
+		logger:     d.Logger(),
 		clock:      d.Clock(),
 		publicURL:  d.APIPublicURL(),
 		tasks:      d.TaskNode(),
+		locks:      d.DistributedLockProvider(),
 		definition: d.DefinitionRepository(),
 		mapper:     mapper.New(d, cfg),
 	}
diff --git a/internal/pkg/service/stream/api/start.go b/internal/pkg/service/stream/api/start.go
index 5793d4f7af..4c989f8718 100644
--- a/internal/pkg/service/stream/api/start.go
+++ b/internal/pkg/service/stream/api/start.go
@@ -22,18 +22,12 @@ const (
 	ExceptionIDPrefix = "keboola-stream-api-"
 )
 
-func Start(ctx context.Context, d dependencies.ServiceScope, cfg config.Config) error {
-	// Create dependencies
-	apiScp, err := dependencies.NewAPIScope(d, cfg) // nolint:forbidigo
-	if err != nil {
-		return err
-	}
-
+func Start(ctx context.Context, d dependencies.APIScope, cfg config.Config) error {
 	// Create service
-	svc := service.New(apiScp, cfg)
+	svc := service.New(d, cfg)
 
 	// Start HTTP server
-	return httpserver.Start(ctx, apiScp, httpserver.Config{
+	return httpserver.Start(ctx, d, httpserver.Config{
 		ListenAddress:     cfg.API.Listen,
 		ErrorNamePrefix:   ErrorNamePrefix,
 		ExceptionIDPrefix: ExceptionIDPrefix,
@@ -52,7 +46,7 @@ func Start(ctx context.Context, d dependencies.ServiceScope, cfg config.Config)
 				return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
 					next.ServeHTTP(w, req.WithContext(context.WithValue(
 						req.Context(),
-						dependencies.PublicRequestScopeCtxKey, dependencies.NewPublicRequestScope(apiScp, req),
+						dependencies.PublicRequestScopeCtxKey, dependencies.NewPublicRequestScope(d, req),
 					)))
 				})
 			})
diff --git a/internal/pkg/service/stream/components.go b/internal/pkg/service/stream/components.go
index 2b03846888..6babb2da85 100644
--- a/internal/pkg/service/stream/components.go
+++ b/internal/pkg/service/stream/components.go
@@ -29,7 +29,7 @@ type Components []Component
 
 type Component string
 
-func StartComponents(ctx context.Context, d dependencies.ServiceScope, cfg config.Config, components ...Component) (err error) {
+func StartComponents(ctx context.Context, serviceScp dependencies.ServiceScope, cfg config.Config, components ...Component) (err error) {
 	componentsMap := make(map[Component]bool)
 	for _, c := range components {
 		componentsMap[c] = true
@@ -38,13 +38,13 @@ func StartComponents(ctx context.Context, d dependencies.ServiceScope, cfg confi
 	// Common distribution scope
 	var distScp commonDeps.DistributionScope
 	if componentsMap[ComponentStorageWriter] || componentsMap[ComponentHTTPSource] || componentsMap[ComponentStorageCoordinator] {
-		distScp = commonDeps.NewDistributionScope(cfg.NodeID, cfg.Distribution, d)
+		distScp = commonDeps.NewDistributionScope(cfg.NodeID, cfg.Distribution, serviceScp)
 	}
 
 	// Common distribution locks scope
 	var distLocksScp commonDeps.DistributedLockScope
-	if componentsMap[ComponentStorageCoordinator] {
-		distLocksScp, err = commonDeps.NewDistributedLockScope(ctx, distlock.NewConfig(), d)
+	if componentsMap[ComponentAPI] || componentsMap[ComponentStorageCoordinator] {
+		distLocksScp, err = commonDeps.NewDistributedLockScope(ctx, distlock.NewConfig(), serviceScp)
 		if err != nil {
 			return err
 		}
@@ -53,7 +53,7 @@ func StartComponents(ctx context.Context, d dependencies.ServiceScope, cfg confi
 	// Common storage scope
 	var storageScp dependencies.StorageScope
 	if componentsMap[ComponentStorageWriter] || componentsMap[ComponentStorageReader] {
-		storageScp, err = dependencies.NewStorageScope(ctx, d, cfg)
+		storageScp, err = dependencies.NewStorageScope(ctx, serviceScp, cfg)
 		if err != nil {
 			return err
 		}
@@ -61,7 +61,7 @@ func StartComponents(ctx context.Context, d dependencies.ServiceScope, cfg confi
 
 	// Start components, always in the same order
 	if componentsMap[ComponentStorageCoordinator] {
-		d, err := dependencies.NewCoordinatorScope(ctx, d, distScp, distLocksScp, cfg)
+		d, err := dependencies.NewCoordinatorScope(ctx, serviceScp, distScp, distLocksScp, cfg)
 		if err != nil {
 			return err
 		}
@@ -91,13 +91,17 @@ func StartComponents(ctx context.Context, d dependencies.ServiceScope, cfg confi
 	}
 
 	if componentsMap[ComponentAPI] {
-		if err := api.Start(ctx, d, cfg); err != nil {
+		apiScp, err := dependencies.NewAPIScope(serviceScp, distLocksScp, cfg) // nolint:forbidigo
+		if err != nil {
+			return err
+		}
+		if err := api.Start(ctx, apiScp, cfg); err != nil {
 			return err
 		}
 	}
 
 	if componentsMap[ComponentHTTPSource] {
-		d, err := dependencies.NewSourceScope(d, distScp, "http-source", cfg)
+		d, err := dependencies.NewSourceScope(serviceScp, distScp, "http-source", cfg)
 		if err != nil {
 			return err
 		}
diff --git a/internal/pkg/service/stream/dependencies/api.go b/internal/pkg/service/stream/dependencies/api.go
index 0f0d1415d3..45b9cd5506 100644
--- a/internal/pkg/service/stream/dependencies/api.go
+++ b/internal/pkg/service/stream/dependencies/api.go
@@ -12,13 +12,14 @@ import (
 // apiSCope implements APIScope interface.
 type apiScope struct {
 	ServiceScope
+	dependencies.DistributedLockScope
 	logger              log.Logger
 	apiPublicURL        *url.URL
 	httpSourcePublicURL *url.URL
 }
 
-func NewAPIScope(serviceScp ServiceScope, cfg config.Config) (v APIScope, err error) {
-	return newAPIScope(serviceScp, cfg), nil
+func NewAPIScope(serviceScp ServiceScope, distLocksScp dependencies.DistributedLockScope, cfg config.Config) (v APIScope, err error) {
+	return newAPIScope(serviceScp, distLocksScp, cfg), nil
 }
 
 func NewMockedAPIScope(tb testing.TB, opts ...dependencies.MockedOption) (APIScope, Mocked) {
@@ -29,20 +30,22 @@ func NewMockedAPIScope(tb testing.TB, opts ...dependencies.MockedOption) (APISco
 func NewMockedAPIScopeWithConfig(tb testing.TB, modifyConfig func(*config.Config), opts ...dependencies.MockedOption) (APIScope, Mocked) {
 	tb.Helper()
 
-	opts = append(opts, dependencies.WithEnabledTasks("test-node"))
+	opts = append(opts, dependencies.WithEnabledTasks("test-node"), dependencies.WithEnabledDistributedLocks())
 	serviceScp, mock := NewMockedServiceScopeWithConfig(tb, modifyConfig, opts...)
 
-	apiScp := newAPIScope(serviceScp, mock.TestConfig())
+	apiScp := newAPIScope(serviceScp, mock, mock.TestConfig())
 
 	mock.DebugLogger().Truncate()
 	return apiScp, mock
 }
 
-func newAPIScope(svcScope ServiceScope, cfg config.Config) APIScope {
+func newAPIScope(svcScope ServiceScope, distLocksScp dependencies.DistributedLockScope, cfg config.Config) APIScope {
 	d := &apiScope{}
 
 	d.ServiceScope = svcScope
 
+	d.DistributedLockScope = distLocksScp
+
 	d.logger = svcScope.Logger().WithComponent("api")
 
 	d.apiPublicURL = cfg.API.PublicURL
diff --git a/internal/pkg/service/stream/dependencies/dependencies.go b/internal/pkg/service/stream/dependencies/dependencies.go
index ad9431acd4..f208f5fff4 100644
--- a/internal/pkg/service/stream/dependencies/dependencies.go
+++ b/internal/pkg/service/stream/dependencies/dependencies.go
@@ -88,6 +88,7 @@ type ServiceScope interface {
 
 type APIScope interface {
 	ServiceScope
+	dependencies.DistributedLockScope
 	APIPublicURL() *url.URL
 	HTTPSourcePublicURL() *url.URL
 }

From a4e5756ea1a9e7e04ff81eea587745048c312535 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Jure=C4=8Dko?= <michal.jurecko@gmail.com>
Date: Fri, 26 Jul 2024 13:45:18 +0200
Subject: [PATCH 3/4] feat: Create only one sink per source at a time

---
 .../pkg/service/stream/api/service/sink.go     | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/internal/pkg/service/stream/api/service/sink.go b/internal/pkg/service/stream/api/service/sink.go
index 041ac5ceb5..af7910e8ac 100644
--- a/internal/pkg/service/stream/api/service/sink.go
+++ b/internal/pkg/service/stream/api/service/sink.go
@@ -2,6 +2,7 @@ package service
 
 import (
 	"context"
+	"fmt"
 	"slices"
 	"strings"
 	"time"
@@ -40,7 +41,22 @@ func (s *service) CreateSink(ctx context.Context, d dependencies.SourceRequestSc
 		ProjectID: d.ProjectID(),
 		ObjectKey: sink.SinkKey,
 		Operation: func(ctx context.Context, logger log.Logger) task.Result {
-			if err := s.definition.Sink().Create(&sink, s.clock.Now(), d.RequestUser(), "New sink.").Do(ctx).Err(); err == nil {
+			// Lock: create only one sink per source at a time
+			lockName := fmt.Sprintf("api.source.create.sink.%s", sink.SourceKey)
+			lock := s.locks.NewMutex(lockName)
+			if err := lock.Lock(ctx); err != nil {
+				return task.ErrResult(err)
+			}
+			defer func() {
+				if err := lock.Unlock(ctx); err != nil {
+					s.logger.Warnf(ctx, "cannot unlock lock %q: %s", lockName, err)
+				}
+			}()
+
+			// Create sink
+			op := s.definition.Sink().Create(&sink, s.clock.Now(), d.RequestUser(), "New sink.")
+			op = op.RequireLock(lock)
+			if err := op.Do(ctx).Err(); err == nil {
 				result := task.OkResult("Sink has been created successfully.")
 				result = s.mapper.WithTaskOutputs(result, sink.SinkKey)
 				return result

From 4ac8966eea43b30fec08eb0293fe98674377a9b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Jure=C4=8Dko?= <michal.jurecko@gmail.com>
Date: Fri, 26 Jul 2024 13:47:31 +0200
Subject: [PATCH 4/4] tests: Simplify tests

---
 .../001-create-source/expected-http-code      |  0
 .../001-create-source/expected-response.json  |  0
 .../001-create-source/request.json            |  0
 .../002-poll-source/expected-http-code        |  0
 .../002-poll-source/expected-response.json    |  0
 .../002-poll-source/request.json              |  0
 .../003-create-sink-1/expected-http-code      |  0
 .../003-create-sink-1/expected-response.json  |  0
 .../003-create-sink-1/request.json            |  0
 .../003-create-sink-2/expected-http-code      |  0
 .../003-create-sink-2/expected-response.json  |  0
 .../003-create-sink-2/request.json            |  0
 .../003-create-sink-3/expected-http-code      |  0
 .../003-create-sink-3/expected-response.json  |  0
 .../003-create-sink-3/request.json            |  0
 .../004-create-sink-1-wait/expected-http-code |  0
 .../expected-response.json                    |  0
 .../004-create-sink-1-wait/request.json       |  0
 .../004-create-sink-2-wait/expected-http-code |  0
 .../expected-response.json                    |  0
 .../004-create-sink-2-wait/request.json       |  0
 .../004-create-sink-3-wait/expected-http-code |  0
 .../expected-response.json                    |  0
 .../004-create-sink-3-wait/request.json       |  0
 .../005-list}/expected-http-code              |  0
 .../005-list}/expected-response.json          | 13 ++-
 .../005-list}/request.json                    |  0
 .../003-create-sink-4/expected-http-code      |  1 -
 .../003-create-sink-4/expected-response.json  |  8 --
 .../003-create-sink-4/request.json            | 29 ------
 .../003-create-sink-5/expected-http-code      |  1 -
 .../003-create-sink-5/expected-response.json  |  8 --
 .../003-create-sink-5/request.json            | 29 ------
 .../expected-response.json                    |  5 -
 .../004-create-sink-4-wait/request.json       | 11 ---
 .../004-create-sink-5-wait/expected-http-code |  1 -
 .../expected-response.json                    |  5 -
 .../004-create-sink-5-wait/request.json       | 11 ---
 .../expected-http-code                        |  1 -
 .../expected-response.json                    | 91 -------------------
 .../expected-http-code                        |  1 -
 .../006-list-limit-2-page-001/request.json    |  7 --
 .../expected-http-code                        |  1 -
 .../expected-response.json                    | 27 ------
 .../007-list-limit-2-page-002/request.json    |  7 --
 .../expected-http-code                        |  1 -
 .../expected-response.json                    | 20 ----
 .../008-list-limit-2-page-003/request.json    |  7 --
 .../expected-http-code                        |  1 -
 .../expected-response.json                    | 12 ---
 .../009-list-limit-2-page-004/request.json    |  7 --
 .../expected-http-code                        |  1 -
 .../expected-response.json                    | 12 ---
 .../request.json                              |  7 --
 54 files changed, 10 insertions(+), 315 deletions(-)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/001-create-source/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/001-create-source/expected-response.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/001-create-source/request.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/002-poll-source/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/002-poll-source/expected-response.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/002-poll-source/request.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-1/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-1/expected-response.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-1/request.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-2/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-2/expected-response.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-2/request.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-3/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-3/expected-response.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/003-create-sink-3/request.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-1-wait/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-1-wait/expected-response.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-1-wait/request.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-2-wait/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-2-wait/expected-response.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-2-wait/request.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-3-wait/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-3-wait/expected-response.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait => create-013-in-parallel}/004-create-sink-3-wait/request.json (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait/004-create-sink-4-wait => create-013-in-parallel/005-list}/expected-http-code (100%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait/006-list-limit-2-page-001 => create-013-in-parallel/005-list}/expected-response.json (68%)
 rename test/stream/api/sink/{list-005-ok-without-sink-create-wait/005-list-limit-default-page-001 => create-013-in-parallel/005-list}/request.json (100%)
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/request.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/request.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/request.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/request.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/request.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/request.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/request.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/request.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-http-code
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-response.json
 delete mode 100644 test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/request.json

diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-http-code b/test/stream/api/sink/create-013-in-parallel/001-create-source/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/001-create-source/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-response.json b/test/stream/api/sink/create-013-in-parallel/001-create-source/expected-response.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/001-create-source/expected-response.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/request.json b/test/stream/api/sink/create-013-in-parallel/001-create-source/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/001-create-source/request.json
rename to test/stream/api/sink/create-013-in-parallel/001-create-source/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-http-code b/test/stream/api/sink/create-013-in-parallel/002-poll-source/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/002-poll-source/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-response.json b/test/stream/api/sink/create-013-in-parallel/002-poll-source/expected-response.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/002-poll-source/expected-response.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/request.json b/test/stream/api/sink/create-013-in-parallel/002-poll-source/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/002-poll-source/request.json
rename to test/stream/api/sink/create-013-in-parallel/002-poll-source/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-http-code b/test/stream/api/sink/create-013-in-parallel/003-create-sink-1/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-1/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-response.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-1/expected-response.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-1/expected-response.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/request.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-1/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-1/request.json
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-1/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-http-code b/test/stream/api/sink/create-013-in-parallel/003-create-sink-2/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-2/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-response.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-2/expected-response.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-2/expected-response.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/request.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-2/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-2/request.json
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-2/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-http-code b/test/stream/api/sink/create-013-in-parallel/003-create-sink-3/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-3/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-response.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-3/expected-response.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-3/expected-response.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/request.json b/test/stream/api/sink/create-013-in-parallel/003-create-sink-3/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-3/request.json
rename to test/stream/api/sink/create-013-in-parallel/003-create-sink-3/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-http-code b/test/stream/api/sink/create-013-in-parallel/004-create-sink-1-wait/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-1-wait/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-response.json b/test/stream/api/sink/create-013-in-parallel/004-create-sink-1-wait/expected-response.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-1-wait/expected-response.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/request.json b/test/stream/api/sink/create-013-in-parallel/004-create-sink-1-wait/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-1-wait/request.json
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-1-wait/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-http-code b/test/stream/api/sink/create-013-in-parallel/004-create-sink-2-wait/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-2-wait/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-response.json b/test/stream/api/sink/create-013-in-parallel/004-create-sink-2-wait/expected-response.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-2-wait/expected-response.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/request.json b/test/stream/api/sink/create-013-in-parallel/004-create-sink-2-wait/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-2-wait/request.json
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-2-wait/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-http-code b/test/stream/api/sink/create-013-in-parallel/004-create-sink-3-wait/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-3-wait/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-response.json b/test/stream/api/sink/create-013-in-parallel/004-create-sink-3-wait/expected-response.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-3-wait/expected-response.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/request.json b/test/stream/api/sink/create-013-in-parallel/004-create-sink-3-wait/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-3-wait/request.json
rename to test/stream/api/sink/create-013-in-parallel/004-create-sink-3-wait/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-http-code b/test/stream/api/sink/create-013-in-parallel/005-list/expected-http-code
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-http-code
rename to test/stream/api/sink/create-013-in-parallel/005-list/expected-http-code
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-response.json b/test/stream/api/sink/create-013-in-parallel/005-list/expected-response.json
similarity index 68%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-response.json
rename to test/stream/api/sink/create-013-in-parallel/005-list/expected-response.json
index dbd39dcc0a..2efbad6c19 100644
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-response.json
+++ b/test/stream/api/sink/create-013-in-parallel/005-list/expected-response.json
@@ -3,10 +3,10 @@
   "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
   "sourceId": "my-source",
   "page": {
-    "limit": 2,
-    "totalCount": 5,
+    "limit": 100,
+    "totalCount": 3,
     "afterId": "",
-    "lastId": "my-sink-2"
+    "lastId": "my-sink-3"
   },
   "sinks": [
     {
@@ -22,6 +22,13 @@
       "sourceId": "my-source",
       "sinkId": "my-sink-2",
       %A
+    },
+    {
+      "projectId": %%TEST_KBC_PROJECT_ID%%,
+      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
+      "sourceId": "my-source",
+      "sinkId": "my-sink-3",
+      %A
     }
   ]
 }
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/request.json b/test/stream/api/sink/create-013-in-parallel/005-list/request.json
similarity index 100%
rename from test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/request.json
rename to test/stream/api/sink/create-013-in-parallel/005-list/request.json
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-http-code
deleted file mode 100644
index 8f897c857d..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-202
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-response.json
deleted file mode 100644
index 40f66d7c2c..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/expected-response.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-4/%s",
-  "type": "api.create.sink",
-  "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-4/%s",
-  "status": "processing",
-  "isFinished": false,
-  "createdAt": "%s"
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/request.json
deleted file mode 100644
index 5ce6489093..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-4/request.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "path": "/v1/branches/default/sources/my-source/sinks",
-  "method": "POST",
-  "headers": {
-    "Content-Type": "application/json",
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  },
-  "body": {
-    "name": "My Sink 4",
-    "type": "table",
-    "table": {
-      "type": "keboola",
-      "tableId": "in.c-my-bucket.my-table-4",
-      "mapping": {
-        "columns": [
-          {
-            "type": "uuid",
-            "name": "id",
-            "primaryKey": true
-          },
-          {
-            "type": "body",
-            "name": "body"
-          }
-        ]
-      }
-    }
-  }
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-http-code
deleted file mode 100644
index 8f897c857d..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-202
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-response.json
deleted file mode 100644
index dbe2db9598..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/expected-response.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "taskId": "api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-5/%s",
-  "type": "api.create.sink",
-  "url": "https://stream.keboola.local/v1/tasks/api.create.sink/%%TEST_DEFAULT_BRANCH_ID%%/my-source/my-sink-5/%s",
-  "status": "processing",
-  "isFinished": false,
-  "createdAt": "%s"
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/request.json
deleted file mode 100644
index f374759f76..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/003-create-sink-5/request.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "path": "/v1/branches/default/sources/my-source/sinks",
-  "method": "POST",
-  "headers": {
-    "Content-Type": "application/json",
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  },
-  "body": {
-    "name": "My Sink 5",
-    "type": "table",
-    "table": {
-      "type": "keboola",
-      "tableId": "in.c-my-bucket.my-table-5",
-      "mapping": {
-        "columns": [
-          {
-            "type": "uuid",
-            "name": "id",
-            "primaryKey": true
-          },
-          {
-            "type": "body",
-            "name": "body"
-          }
-        ]
-      }
-    }
-  }
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-response.json
deleted file mode 100644
index 6a86c1329a..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/expected-response.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-%A
-  "status": "success",
-%A
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/request.json
deleted file mode 100644
index 6ea8338a80..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-4-wait/request.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  "path": "<<003-create-sink-4:response.url>>",
-  "method": "GET",
-  "headers": {
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  },
-  "repeat": {
-    "until": "status != 'processing'",
-    "timeout": 120
-  }
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-http-code
deleted file mode 100644
index 08839f6bb2..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-response.json
deleted file mode 100644
index 6a86c1329a..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/expected-response.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-%A
-  "status": "success",
-%A
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/request.json
deleted file mode 100644
index 555095bbbc..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/004-create-sink-5-wait/request.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  "path": "<<003-create-sink-5:response.url>>",
-  "method": "GET",
-  "headers": {
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  },
-  "repeat": {
-    "until": "status != 'processing'",
-    "timeout": 120
-  }
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-http-code
deleted file mode 100644
index 08839f6bb2..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-response.json
deleted file mode 100644
index 210559521d..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/005-list-limit-default-page-001/expected-response.json
+++ /dev/null
@@ -1,91 +0,0 @@
-{
-  "projectId": %%TEST_KBC_PROJECT_ID%%,
-  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-  "sourceId": "my-source",
-  "page": {
-    "limit": 100,
-    "totalCount": 5,
-    "afterId": "",
-    "lastId": "my-sink-5"
-  },
-  "sinks": [
-    {
-      "projectId": %%TEST_KBC_PROJECT_ID%%,
-      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-      "sourceId": "my-source",
-      "sinkId": "my-sink-1",
-      "type": "table",
-      "name": "My Sink 1",
-      "description": "",
-      "table": {
-        "type": "keboola",
-        "tableId": "in.c-my-bucket.my-table-1",
-        "mapping": {
-          "columns": [
-            {
-              "primaryKey": true,
-              "type": "uuid-v7",
-              "name": "id"
-            },
-            {
-              "primaryKey": false,
-              "type": "body",
-              "name": "body"
-            }
-          ]
-        }
-      },
-      "version": {
-        "number": 1,
-        "hash": "%s",
-        "description": "New sink.",
-        "at": "%s",
-        "by": {
-          "type": "user",
-          "tokenId": "%s",
-          "tokenDesc": "%s",
-          "userId": "%s",
-          "userName": "%s"
-        }
-      },
-      "created": {
-        "at": "%s",
-        "by": {
-          "type": "user",
-          "tokenId": "%s",
-          "tokenDesc": "%s",
-          "userId": "%s",
-          "userName": "%s"
-        }
-      }
-    },
-    {
-      "projectId": %%TEST_KBC_PROJECT_ID%%,
-      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-      "sourceId": "my-source",
-      "sinkId": "my-sink-2",
-      %A
-    },
-    {
-      "projectId": %%TEST_KBC_PROJECT_ID%%,
-      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-      "sourceId": "my-source",
-      "sinkId": "my-sink-3",
-      %A
-    },
-    {
-      "projectId": %%TEST_KBC_PROJECT_ID%%,
-      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-      "sourceId": "my-source",
-      "sinkId": "my-sink-4",
-      %A
-    },
-    {
-      "projectId": %%TEST_KBC_PROJECT_ID%%,
-      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-      "sourceId": "my-source",
-      "sinkId": "my-sink-5",
-      %A
-    }
-  ]
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-http-code
deleted file mode 100644
index 08839f6bb2..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/request.json
deleted file mode 100644
index 1bbdd79c37..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/006-list-limit-2-page-001/request.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?limit=2",
-  "method": "GET",
-  "headers": {
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  }
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-http-code
deleted file mode 100644
index 08839f6bb2..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-response.json
deleted file mode 100644
index 51bf94bacc..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/expected-response.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "projectId": %%TEST_KBC_PROJECT_ID%%,
-  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-  "sourceId": "my-source",
-  "page": {
-    "limit": 2,
-    "totalCount": 5,
-    "afterId": "my-sink-2",
-    "lastId": "my-sink-4"
-  },
-  "sinks": [
-    {
-      "projectId": %%TEST_KBC_PROJECT_ID%%,
-      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-      "sourceId": "my-source",
-      "sinkId": "my-sink-3",
-      %A
-    },
-    {
-      "projectId": %%TEST_KBC_PROJECT_ID%%,
-      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-      "sourceId": "my-source",
-      "sinkId": "my-sink-4",
-      %A
-    }
-  ]
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/request.json
deleted file mode 100644
index 82f5bec649..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/007-list-limit-2-page-002/request.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?limit=2&afterId=my-sink-2",
-  "method": "GET",
-  "headers": {
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  }
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-http-code
deleted file mode 100644
index 08839f6bb2..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-response.json
deleted file mode 100644
index 7ba6d4ad51..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/expected-response.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "projectId": %%TEST_KBC_PROJECT_ID%%,
-  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-  "sourceId": "my-source",
-  "page": {
-    "limit": 2,
-    "totalCount": 5,
-    "afterId": "my-sink-4",
-    "lastId": "my-sink-5"
-  },
-  "sinks": [
-    {
-      "projectId": %%TEST_KBC_PROJECT_ID%%,
-      "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-      "sourceId": "my-source",
-      "sinkId": "my-sink-5",
-      %A
-    }
-  ]
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/request.json
deleted file mode 100644
index 3681703234..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/008-list-limit-2-page-003/request.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?limit=2&afterId=my-sink-4",
-  "method": "GET",
-  "headers": {
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  }
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-http-code
deleted file mode 100644
index 08839f6bb2..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-response.json
deleted file mode 100644
index cde02ac14d..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/expected-response.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "projectId": %%TEST_KBC_PROJECT_ID%%,
-  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-  "sourceId": "my-source",
-  "page": {
-    "limit": 2,
-    "totalCount": 5,
-    "afterId": "my-sink-5",
-    "lastId": ""
-  },
-  "sinks": []
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/request.json
deleted file mode 100644
index b658dafdf0..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/009-list-limit-2-page-004/request.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?limit=2&afterId=my-sink-5",
-  "method": "GET",
-  "headers": {
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  }
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-http-code b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-http-code
deleted file mode 100644
index 08839f6bb2..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-http-code
+++ /dev/null
@@ -1 +0,0 @@
-200
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-response.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-response.json
deleted file mode 100644
index 893a09157a..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/expected-response.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "projectId": %%TEST_KBC_PROJECT_ID%%,
-  "branchId": %%TEST_DEFAULT_BRANCH_ID%%,
-  "sourceId": "my-source",
-  "page": {
-    "limit": 100,
-    "totalCount": 5,
-    "afterId": "my-sink-5",
-    "lastId": ""
-  },
-  "sinks": []
-}
diff --git a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/request.json b/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/request.json
deleted file mode 100644
index a2c612965c..0000000000
--- a/test/stream/api/sink/list-005-ok-without-sink-create-wait/010-list-limit-default-page-002/request.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "path": "/v1/branches/%%TEST_DEFAULT_BRANCH_ID%%/sources/my-source/sinks?afterId=my-sink-5",
-  "method": "GET",
-  "headers": {
-    "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%"
-  }
-}