From d43f9677ca43a43f9753285be7dc226cf3465964 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 22 Nov 2024 13:22:04 +0100 Subject: [PATCH] test: added test --- .../003-detail-components-ok}/expected-http-code | 0 .../003-detail-components-ok/expected-response.json | 9 +++++++++ .../detail/003-detail-components-ok/request.json | 9 +++++++++ .../list-repositories/001-list/expected-http-code | 1 + .../001-list/expected-response.json | 9 +++++++++ .../{list => list-repositories}/001-list/request.json | 0 .../{list => list-repositories}/initial-state.json | 0 7 files changed, 28 insertions(+) rename test/templates/api/repositories/{list/001-list => detail/003-detail-components-ok}/expected-http-code (100%) create mode 100644 test/templates/api/repositories/detail/003-detail-components-ok/expected-response.json create mode 100644 test/templates/api/repositories/detail/003-detail-components-ok/request.json create mode 100644 test/templates/api/repositories/list-repositories/001-list/expected-http-code rename test/templates/api/repositories/{list => list-repositories}/001-list/expected-response.json (50%) rename test/templates/api/repositories/{list => list-repositories}/001-list/request.json (100%) rename test/templates/api/repositories/{list => list-repositories}/initial-state.json (100%) diff --git a/test/templates/api/repositories/list/001-list/expected-http-code b/test/templates/api/repositories/detail/003-detail-components-ok/expected-http-code similarity index 100% rename from test/templates/api/repositories/list/001-list/expected-http-code rename to test/templates/api/repositories/detail/003-detail-components-ok/expected-http-code diff --git a/test/templates/api/repositories/detail/003-detail-components-ok/expected-response.json b/test/templates/api/repositories/detail/003-detail-components-ok/expected-response.json new file mode 100644 index 0000000000..ec3de75540 --- /dev/null +++ b/test/templates/api/repositories/detail/003-detail-components-ok/expected-response.json @@ -0,0 +1,9 @@ +{ + "name": "keboola-components", + "url": "https://github.com/keboola/keboola-as-code-templates-components.git", + "ref": "main", + "author": { + "name": "Keboola", + "url": "https://keboola.com" + } +} diff --git a/test/templates/api/repositories/detail/003-detail-components-ok/request.json b/test/templates/api/repositories/detail/003-detail-components-ok/request.json new file mode 100644 index 0000000000..e3ca850347 --- /dev/null +++ b/test/templates/api/repositories/detail/003-detail-components-ok/request.json @@ -0,0 +1,9 @@ +{ + "path": "/v1/repositories/keboola-components", + "method": "GET", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "body": {} +} diff --git a/test/templates/api/repositories/list-repositories/001-list/expected-http-code b/test/templates/api/repositories/list-repositories/001-list/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/templates/api/repositories/list-repositories/001-list/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/templates/api/repositories/list/001-list/expected-response.json b/test/templates/api/repositories/list-repositories/001-list/expected-response.json similarity index 50% rename from test/templates/api/repositories/list/001-list/expected-response.json rename to test/templates/api/repositories/list-repositories/001-list/expected-response.json index f4561e6ac6..929ebf8fc3 100644 --- a/test/templates/api/repositories/list/001-list/expected-response.json +++ b/test/templates/api/repositories/list-repositories/001-list/expected-response.json @@ -8,6 +8,15 @@ "name": "Keboola", "url": "https://keboola.com" } + }, + { + "name": "keboola-components", + "url": "https://github.com/keboola/keboola-as-code-templates-components.git", + "ref": "main", + "author": { + "name": "Keboola", + "url": "https://keboola.com" + } } ] } diff --git a/test/templates/api/repositories/list/001-list/request.json b/test/templates/api/repositories/list-repositories/001-list/request.json similarity index 100% rename from test/templates/api/repositories/list/001-list/request.json rename to test/templates/api/repositories/list-repositories/001-list/request.json diff --git a/test/templates/api/repositories/list/initial-state.json b/test/templates/api/repositories/list-repositories/initial-state.json similarity index 100% rename from test/templates/api/repositories/list/initial-state.json rename to test/templates/api/repositories/list-repositories/initial-state.json