Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Backend Tests in Transactions #2304

Merged
merged 13 commits into from
Jan 13, 2021
Merged

Run Backend Tests in Transactions #2304

merged 13 commits into from
Jan 13, 2021

Commits on Jan 6, 2021

  1. Configuration menu
    Copy the full SHA
    843a149 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a471874 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2021

  1. Configuration menu
    Copy the full SHA
    a08fd3e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3176538 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cacc8b4 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2021

  1. Configuration menu
    Copy the full SHA
    008ec95 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0a88169 View commit details
    Browse the repository at this point in the history
  3. Tests: remove prepDb workaround

    Previously, the `prepareDatabase` method would directly modify the database, booting the app in the process. This would prevent any extenders from being applied, since `->extend()` has no effect once the app is booted.
    
    Since the new implementation of `prepareDatabase` simply registers seed data to be applied during app boot, the workaround of sticking this seed data into `prepDb` is no longer necessary, and seed data common to all test cases in a class can be provided in `setUp`.
    
    When needed, app boot is explicitly triggered in individual test cases by calling `$this->app()`.
    askvortsov1 committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    ae28001 View commit details
    Browse the repository at this point in the history
  4. Tests: Comply with default permissions

    Before transactions, each test class would need to explicitly state starting state for permissions, which made the initial permission configuration somewhat arbitrary. Now, we might as well use the initial state of the default installation.
    
    One of the User show_test tests has been commented out until
    askvortsov1 committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    c1aa145 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fd79a14 View commit details
    Browse the repository at this point in the history
  6. Tests: purge settings cache

    Some tests need to change settings, but since MemoryCacheSettingsRepository caches settings in-memory, those changes aren't reflected. The new `purgeSettingsCache` removes it from the container, eliminating that cache.
    
    For UserTest, we also need to regenerate the display name driver, since that's set statically on boot, before we'll get a change to clear the settings cache.
    askvortsov1 committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    6771b3e View commit details
    Browse the repository at this point in the history
  7. Fix fulltext search tests

    Under InnoDB, database entries created in transactions are not processed by fulltext indexes until the transaction is committed. To work around this, cases that test fulltext search have been split off into a separate class that adds and removes seed discussions/posts outside of transactions during setUp/tearDown.
    askvortsov1 committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    4bac667 View commit details
    Browse the repository at this point in the history
  8. Apply fixes from StyleCI

    [ci skip] [skip ci]
    askvortsov1 committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    e5f277e View commit details
    Browse the repository at this point in the history