summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2022-03-10 15:49:22 +0100
committerBenjamin Brahmer <info@b-brahmer.de>2022-05-03 21:27:48 +0200
commitd99bdf562d63f99a6d68a48a650233d50e834003 (patch)
tree85eaa72859b4f9bf22500677dfc885442256dadd
parenteeb3c15b0522ba06aff5903de2a24007017daf43 (diff)
Use builtin php server to test the api
rename integration to command Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r--.github/workflows/api-integration-tests.yml20
-rw-r--r--tests/command/explore.bats (renamed from tests/integration/explore.bats)0
-rw-r--r--tests/command/feeds.bats (renamed from tests/integration/feeds.bats)0
-rw-r--r--tests/command/folders.bats (renamed from tests/integration/folders.bats)0
-rw-r--r--tests/command/helpers/settings.bash (renamed from tests/integration/helpers/settings.bash)0
-rw-r--r--tests/command/items.bats (renamed from tests/integration/items.bats)0
-rw-r--r--tests/command/opml.bats (renamed from tests/integration/opml.bats)0
7 files changed, 17 insertions, 3 deletions
diff --git a/.github/workflows/api-integration-tests.yml b/.github/workflows/api-integration-tests.yml
index c9a1d4cc9..c1d7bb6f9 100644
--- a/.github/workflows/api-integration-tests.yml
+++ b/.github/workflows/api-integration-tests.yml
@@ -33,11 +33,11 @@ jobs:
database: ['sqlite', 'pgsql', 'mysql']
experimental: [false]
include:
- - php-versions: 8.0
+ - php-versions: '8.0'
nextcloud: pre-release
database: sqlite
experimental: true
- - php-versions: 8.1
+ - php-versions: '8.1'
nextcloud: pre-release
database: sqlite
experimental: true
@@ -108,6 +108,19 @@ jobs:
check-code: false
force: ${{ matrix.experimental }}
+ - name: run api test
+ if: matrix.database == 'sqlite'
+ working-directory: ../server
+ run: |
+ php -S localhost:8080 > /tmp/webserver.log &
+ sleep 2
+
+ # Call folders api
+ curl -v -u admin:admin http://localhost:8080/index.php/apps/news/api/v1-2/folders
+
+ # Kill php server
+ kill %1
+
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -118,7 +131,7 @@ jobs:
- name: Functional tests
working-directory: ../server
- run: bats apps/news/tests/integration
+ run: bats apps/news/tests/command
- name: Prep PHP tests
working-directory: ../server/apps/news
@@ -127,3 +140,4 @@ jobs:
- name: Feed tests
working-directory: ../server/apps/news
run: make feed-test
+
diff --git a/tests/integration/explore.bats b/tests/command/explore.bats
index 7407dc8a8..7407dc8a8 100644
--- a/tests/integration/explore.bats
+++ b/tests/command/explore.bats
diff --git a/tests/integration/feeds.bats b/tests/command/feeds.bats
index 5ad52dc30..5ad52dc30 100644
--- a/tests/integration/feeds.bats
+++ b/tests/command/feeds.bats
diff --git a/tests/integration/folders.bats b/tests/command/folders.bats
index 48b15f05b..48b15f05b 100644
--- a/tests/integration/folders.bats
+++ b/tests/command/folders.bats
diff --git a/tests/integration/helpers/settings.bash b/tests/command/helpers/settings.bash
index bf58a601a..bf58a601a 100644
--- a/tests/integration/helpers/settings.bash
+++ b/tests/command/helpers/settings.bash
diff --git a/tests/integration/items.bats b/tests/command/items.bats
index 22a4c73c7..22a4c73c7 100644
--- a/tests/integration/items.bats
+++ b/tests/command/items.bats
diff --git a/tests/integration/opml.bats b/tests/command/opml.bats
index b2d576e8e..b2d576e8e 100644
--- a/tests/integration/opml.bats
+++ b/tests/command/opml.bats