mirror of
https://github.com/nextcloud/server.git
synced 2024-07-31 20:15:57 +02:00
First integration tests for provisioning api
This commit is contained in:
parent
580a961020
commit
631303c1e7
6
build/integration/composer.json
Normal file
6
build/integration/composer.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"require-dev": {
|
||||
"guzzlehttp/guzzle": "~5.0",
|
||||
"behat/behat": "2.4.*@stable"
|
||||
}
|
||||
}
|
17
build/integration/config/behat.yml
Normal file
17
build/integration/config/behat.yml
Normal file
@ -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
|
9
build/integration/features/provisioning-v1.feature
Normal file
9
build/integration/features/provisioning-v1.feature
Normal file
@ -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"
|
||||
|
9
build/integration/features/provisioning-v2.feature
Normal file
9
build/integration/features/provisioning-v2.feature
Normal file
@ -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"
|
||||
|
18
build/integration/run.sh
Executable file
18
build/integration/run.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user