fix using rh-php7x collection

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2019-04-09 22:26:58 +02:00
parent da1aa3b983
commit bd1073c07d
No known key found for this signature in database
GPG key ID: 7424F1874854DF23
2 changed files with 19 additions and 18 deletions

View file

@ -70,22 +70,20 @@ steps:
- cd tests/unit/
- phpunit --configuration phpunit.xml
- name: integration-tests-master
image: nextcloudci/user_saml_shibboleth-php7:user_saml_shibboleth_php7-5
image: nextcloudci/user_saml_shibboleth-php7.2:user_saml_shibboleth_php7.2-1
environment:
CORE_BRANCH: master
commands:
- /start.sh &
- sleep 3
- scl enable rh-php70 bash
- rm -rf /var/www/html
- cd /var/www/
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
- cd /var/www/html && git submodule update --init
- cd /var/www/html/apps/ && git clone -b $DRONE_BRANCH https://github.com/nextcloud/user_saml.git
- php /var/www/html/occ maintenance:install --database sqlite --admin-pass password
- php /var/www/html/occ app:enable user_saml
- scl enable rh-php72 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
- chown -R apache:apache /var/www/html/
- cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat
- scl enable rh-php72 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"
trigger:
branch:
@ -121,16 +119,14 @@ steps:
commands:
- /start.sh &
- sleep 3
- scl enable rh-php70 bash
- rm -rf /var/www/html
- cd /var/www/
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
- cd /var/www/html && git submodule update --init
- cd /var/www/html/apps/ && git clone -b $DRONE_BRANCH https://github.com/nextcloud/user_saml.git
- php /var/www/html/occ maintenance:install --database sqlite --admin-pass password
- php /var/www/html/occ app:enable user_saml
- scl enable rh-php70 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
- chown -R apache:apache /var/www/html/
- cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat
- scl enable rh-php70 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"
trigger:
branch:
@ -166,16 +162,14 @@ steps:
commands:
- /start.sh &
- sleep 3
- scl enable rh-php70 bash
- rm -rf /var/www/html
- cd /var/www/
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
- cd /var/www/html && git submodule update --init
- cd /var/www/html/apps/ && git clone -b $DRONE_BRANCH https://github.com/nextcloud/user_saml.git
- php /var/www/html/occ maintenance:install --database sqlite --admin-pass password
- php /var/www/html/occ app:enable user_saml
- scl enable rh-php70 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
- chown -R apache:apache /var/www/html/
- cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat
- scl enable rh-php70 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"
trigger:
branch:

View file

@ -45,6 +45,8 @@ class FeatureContext implements Context {
'track_redirects' => true,
],
]);
}
/** @AfterScenario */
@ -56,7 +58,8 @@ class FeatureContext implements Context {
foreach($users as $user) {
shell_exec(
sprintf(
'sudo -u apache /opt/rh/rh-php70/root/usr/bin/php %s user:delete %s',
'sudo -u apache %s %s user:delete %s',
PHP_BINARY,
__DIR__ . '/../../../../../../occ',
$user
)
@ -66,7 +69,8 @@ class FeatureContext implements Context {
foreach($this->changedSettings as $setting) {
shell_exec(
sprintf(
'sudo -u apache /opt/rh/rh-php70/root/usr/bin/php %s config:app:delete user_saml %s',
'sudo -u apache %s %s config:app:delete user_saml %s',
PHP_BINARY,
__DIR__ . '/../../../../../../occ',
$setting
)
@ -86,7 +90,8 @@ class FeatureContext implements Context {
$this->changedSettings[] = $settingName;
shell_exec(
sprintf(
'sudo -u apache /opt/rh/rh-php70/root/usr/bin/php %s config:app:set --value="%s" user_saml %s',
'sudo -u apache %s %s config:app:set --value="%s" user_saml %s',
PHP_BINARY,
__DIR__ . '/../../../../../../occ',
$value,
$settingName
@ -235,7 +240,8 @@ class FeatureContext implements Context {
public function aLocalUserWithUidExists($uid) {
shell_exec(
sprintf(
'sudo -u apache OC_PASS=password /opt/rh/rh-php70/root/usr/bin/php %s user:add %s --display-name "Default displayname of '.$uid.'" --password-from-env',
'sudo -u apache OC_PASS=password%s %s user:add %s --display-name "Default displayname of '.$uid.'" --password-from-env',
PHP_BINARY,
__DIR__ . '/../../../../../../occ',
$uid
)
@ -251,7 +257,8 @@ class FeatureContext implements Context {
public function theLastLoginTimestampOfShouldNotBeEmpty($uid) {
$response = shell_exec(
sprintf(
'sudo -u apache OC_PASS=password /opt/rh/rh-php70/root/usr/bin/php %s user:lastseen %s',
'sudo -u apache OC_PASS=password %s %s user:lastseen %s',
PHP_BINARY,
__DIR__ . '/../../../../../../occ',
$uid
)