Skip to content

Commit 5aaf23b

Browse files
authored
Misc test fixes (GoogleCloudPlatform#546)
* removes composer command env, set -x, and PHP 7.2 allowed failures * catches monitoringTest exceptions * fixes error reporting tests * fixes logging tests * adds build for running tests w/o grpc and fixes non-grpc tests * fixes or skips video test, skips missing composer requirements (non-grpc) * marks DLP as flakey
1 parent f66cc44 commit 5aaf23b

18 files changed

+202
-212
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ php:
2828
matrix:
2929
include:
3030
- php: 5.6
31-
env: RUN_DEVSERVER_TESTS=true RUN_CS_FIXER=true COMPOSER_COMMAND='composer -q update'
32-
allow_failures:
31+
env: RUN_DEVSERVER_TESTS=true RUN_CS_FIXER=true
3332
- php: 7.2
33+
env: SKIP_GRPC=true
3434

3535
env:
3636
global:
@@ -39,7 +39,6 @@ env:
3939
- PATH="${HOME}/google-cloud-sdk/bin:${PATH}"
4040
- PHP_CGI_PATH=/home/travis/.phpenv/shims/php-cgi
4141
- TEST_BUILD_DIR=$TRAVIS_BUILD_DIR
42-
- COMPOSER_COMMAND='composer -q install'
4342

4443
before_install:
4544
- git clone https://github.com/GoogleCloudPlatform/php-tools.git ${HOME}/php-tools
@@ -49,8 +48,9 @@ before_install:
4948
- sudo apt-get update && sudo apt-get install -y python-ipaddr
5049

5150
before_script:
52-
- travis_retry pecl install grpc
51+
- if [ "${SKIP_GRPC}" != "true" ]; then travis_retry pecl install grpc; fi
5352
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then yes '' | pecl install "channel://pecl.php.net/mcrypt-1.0.1"; fi
53+
- composer self-update
5454

5555
script:
5656
- testing/run_all_tests.sh

error_reporting/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@
77
"require-dev": {
88
"phpunit/phpunit": "~4.8",
99
"google/cloud-tools": "^0.6.9"
10+
},
11+
"autoload-dev": {
12+
"psr-4": {
13+
"Google\\Cloud\\Samples\\ErrorReporting\\": "test"
14+
}
1015
}
1116
}

0 commit comments

Comments
 (0)