Skip to content

Commit aaa0b21

Browse files
committed
add integration test to ensure credentials are not logged in plain text
Signed-off-by: Arthur Schiwon <[email protected]>
1 parent 0233484 commit aaa0b21

File tree

8 files changed

+2661
-1
lines changed

8 files changed

+2661
-1
lines changed

.github/workflows/integration.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Integration
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/integration.yml'
7+
- 'appinfo/**'
8+
- 'lib/**'
9+
- 'tests/**'
10+
11+
push:
12+
branches:
13+
- master
14+
- stable*
15+
16+
env:
17+
APP_NAME: sharepoint
18+
19+
jobs:
20+
sqlite:
21+
runs-on: ubuntu-latest
22+
23+
strategy:
24+
# do not stop on another job's failure
25+
fail-fast: false
26+
matrix:
27+
php-versions: ['7.4', '8.0', '8.1']
28+
databases: ['sqlite']
29+
server-versions: ['master']
30+
31+
name: integration-php${{ matrix.php-versions }}-${{ matrix.databases }}
32+
33+
steps:
34+
- name: Checkout server
35+
uses: actions/checkout@v2
36+
with:
37+
repository: nextcloud/server
38+
ref: ${{ matrix.server-versions }}
39+
40+
- name: Checkout submodules
41+
shell: bash
42+
run: |
43+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
44+
git submodule sync --recursive
45+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
46+
- name: Checkout app
47+
uses: actions/checkout@v2
48+
with:
49+
path: apps/${{ env.APP_NAME }}
50+
51+
- name: Set up php ${{ matrix.php-versions }}
52+
uses: shivammathur/setup-php@v2
53+
with:
54+
php-version: ${{ matrix.php-versions }}
55+
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
56+
coverage: none
57+
58+
- name: Install app dependencies
59+
working-directory: apps/${{ env.APP_NAME }}
60+
run: composer i
61+
62+
- name: Install test dependencies
63+
working-directory: apps/${{ env.APP_NAME }}/tests/Integration
64+
run: composer i
65+
66+
- name: Set up Nextcloud
67+
env:
68+
DB_PORT: 4444
69+
run: |
70+
mkdir data
71+
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
72+
php -f index.php
73+
./occ app:enable files_external
74+
./occ app:enable --force ${{ env.APP_NAME }}
75+
php -S localhost:8080 &
76+
- name: Integration
77+
working-directory: apps/${{ env.APP_NAME }}/tests/Integration
78+
run: bash run.sh

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
composer.phar
2-
/vendor/
2+
vendor/

tests/Integration/composer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"config": {
3+
"platform": {
4+
"php": "7.4"
5+
}
6+
},
7+
"require-dev": {
8+
"behat/behat": "^3.11",
9+
"jarnaiz/behat-junit-formatter": "^1.3",
10+
"guzzlehttp/guzzle": "^7.4"
11+
}
12+
}

0 commit comments

Comments
 (0)