nextcloud / twofactor_totp

🔑 Second factor TOTP (RFC 6238) provider for Nextcloud
https://apps.nextcloud.com/apps/twofactor_totp
GNU Affero General Public License v3.0
288 stars 56 forks source link

Fix acceptance tests #1410

Closed st3iny closed 1 year ago

st3iny commented 1 year ago

Acceptance tests are currently failing:

  composer run test:acceptance
  shell: /usr/bin/bash -e {0}
  env:
    CI: true
    TRAVIS: true
    RUNNER_TOOL_CACHE: /tmp
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
    SAUCE_USERNAME: ***
    SAUCE_ACCESS_KEY: ***
    SAUCE_TUNNEL_ID: 5505912875-master-php8.1-firefox
    SELENIUM_BROWSER: firefox
> phpunit -c tests/phpunit.xml tests/Acceptance
PHPUnit 9.5.20 #StandWithUkraine

Runtime:       PHP 8.1.2-1ubuntu2.11
Configuration: tests/phpunit.xml
Warning:       No code coverage driver available

FF                                                                  2 / 2 (100%)

Time: 00:31.335, Memory: 28.00 MB

There were 2 failures:

1) OCA\TwoFactorTOTP\Tests\Acceptance\TOTPAcceptanceTest::testEnableTOTP
Failed asserting that '' contains "Nextcloud".

/home/runner/actions-runner/_work/twofactor_totp/twofactor_totp/nextcloud/apps/twofactor_totp/tests/Acceptance/TOTPAcceptanceTest.php:68

2) OCA\TwoFactorTOTP\Tests\Acceptance\TOTPAcceptanceTest::testLoginShouldFailWithWrongOTP
Failed asserting that '' contains "Nextcloud".

/home/runner/actions-runner/_work/twofactor_totp/twofactor_totp/nextcloud/apps/twofactor_totp/tests/Acceptance/TOTPAcceptanceTest.php:154

FAILURES!
Tests: 2, Assertions: 2, Failures: 2.
Script phpunit -c tests/phpunit.xml tests/Acceptance handling the test:acceptance event returned with error code 1
Error: Process completed with exit code 1.
st3iny commented 1 year ago

Acceptance tests are probably failing due to pollution caused by the nextcloud/ocp composer dependency.