summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-06 15:44:24 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-29 13:42:32 +0200
commit631303c1e74cb10a63fa46f99e3111067ec2f010 (patch)
tree383173fb9cde008e119660488b8e44d248d7ab11 /build
parent580a961020fb8b7cbfc499b0808dfeca90039cdb (diff)
downloadnextcloud-server-631303c1e74cb10a63fa46f99e3111067ec2f010.tar.gz
nextcloud-server-631303c1e74cb10a63fa46f99e3111067ec2f010.zip
First integration tests for provisioning api
Diffstat (limited to 'build')
-rw-r--r--build/integration/composer.json6
-rw-r--r--build/integration/config/behat.yml17
-rw-r--r--build/integration/features/provisioning-v1.feature9
-rw-r--r--build/integration/features/provisioning-v2.feature9
-rwxr-xr-xbuild/integration/run.sh18
5 files changed, 59 insertions, 0 deletions
diff --git a/build/integration/composer.json b/build/integration/composer.json
new file mode 100644
index 00000000000..f77ddba9bcd
--- /dev/null
+++ b/build/integration/composer.json
@@ -0,0 +1,6 @@
+{
+ "require-dev": {
+ "guzzlehttp/guzzle": "~5.0",
+ "behat/behat": "2.4.*@stable"
+ }
+}
diff --git a/build/integration/config/behat.yml b/build/integration/config/behat.yml
new file mode 100644
index 00000000000..78a228a5c1e
--- /dev/null
+++ b/build/integration/config/behat.yml
@@ -0,0 +1,17 @@
+default:
+ paths:
+ features: ../features
+ bootstrap: %behat.paths.features%/bootstrap
+
+ context:
+ parameters:
+ baseUrl: http://localhost:8080/ocs/
+ admin:
+ - admin
+ - admin
+
+ci:
+ formatter:
+ name: junit
+ parameters:
+ output_path: ./output
diff --git a/build/integration/features/provisioning-v1.feature b/build/integration/features/provisioning-v1.feature
new file mode 100644
index 00000000000..dd574186b56
--- /dev/null
+++ b/build/integration/features/provisioning-v1.feature
@@ -0,0 +1,9 @@
+Feature: provisioning
+ Background:
+ Given using api version "1"
+
+ Scenario: Getting an not existing user
+ Given As an "admin"
+ When sending "GET" to "/cloud/users/test"
+ Then the status code should be "200"
+
diff --git a/build/integration/features/provisioning-v2.feature b/build/integration/features/provisioning-v2.feature
new file mode 100644
index 00000000000..72ceed5d6a5
--- /dev/null
+++ b/build/integration/features/provisioning-v2.feature
@@ -0,0 +1,9 @@
+Feature: provisioning
+ Background:
+ Given using api version "2"
+
+ Scenario: Getting an not existing user
+ Given As an "admin"
+ When sending "GET" to "/cloud/users/test"
+ Then the status code should be "404"
+
diff --git a/build/integration/run.sh b/build/integration/run.sh
new file mode 100755
index 00000000000..40afbe85b9b
--- /dev/null
+++ b/build/integration/run.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+composer install
+
+# TODO: avoid port collision on jenkins - use $EXECUTOR_NUMBER
+if [ -z "$EXECUTOR_NUMBER" ]; then
+ EXECUTOR_NUMBER=0
+fi
+PORT=$((8080 + $EXECUTOR_NUMBER))
+echo $PORT
+php -S localhost:$PORT -t ../.. &
+PHPPID=$!
+echo $PHPPID
+
+export BEHAT_PARAMS="context[parameters][base_url]=http://localhost:$PORT/ocs"
+vendor/bin/behat
+
+kill $PHPPID