From 89ca3f087ee3f190e5e44247ba596267d954182e Mon Sep 17 00:00:00 2001 From: rxu Date: Sat, 13 Nov 2021 22:39:55 +0700 Subject: [PATCH] [ticket/16909] Fix Postgres configuration on Windows, fix auth tests PHPBB3-16909 --- .github/workflows/tests.yml | 1 + tests/functional/auth_test.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7294c7ffe3..ca4574bf6e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -561,6 +561,7 @@ jobs: } [System.Environment]::SetEnvironmentVariable('PATH',$Env:PATH+";${env:PGBIN}") $env:PGPASSWORD = 'root' + psql -c hot_standby=on psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres psql -c 'create database phpbb_tests;' -U postgres Set-MpPreference -ExclusionPath "${env:PGDATA}" # Exclude PGDATA directory from Windows Defender diff --git a/tests/functional/auth_test.php b/tests/functional/auth_test.php index 8bf3e61c1f..6c5e22869e 100644 --- a/tests/functional/auth_test.php +++ b/tests/functional/auth_test.php @@ -101,7 +101,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case $this->assertStringContainsString($this->lang('AUTH_PROVIDER_OAUTH_SERVICE_GOOGLE'), $crawler->filter('h3')->text()); $form = $crawler->selectButton($this->lang('UCP_AUTH_LINK_LINK'))->form(); $crawler = self::submit($form); - $this->assertStringContainsString('Google Accounts', $crawler->filter('title')->text()); + $this->assertStringContainsString('accounts.google.com', $crawler->filter('base')->attr('href')); // Test OAuth linking for registration $this->logout(); @@ -111,7 +111,7 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case $crawler = self::submit($form); $this->assertContainsLang('AUTH_PROVIDER_OAUTH_SERVICE_GOOGLE', $crawler->filter('a[class="button2"]')->text()); $crawler = self::request('GET', 'ucp.php?mode=login&login=external&oauth_service=google'); - $this->assertStringContainsString('Google Accounts', $crawler->filter('title')->text()); + $this->assertStringContainsString('accounts.google.com', $crawler->filter('base')->attr('href')); // Restore default auth method, but unset random keys first // Restart webclient as we were redirected to external site before