-
Notifications
You must be signed in to change notification settings - Fork 40
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
Upgrade tests in 1.30.0 are supposed to fail due to a bug - they are not failing. #6841
Comments
What I struggled with is that it's impossible to use state or config for that, when running the upgrade test. Neither is available that early (before update_access_allowed() does its check). It's possible to not use the user-1 trick in UpgradePathTestCase::setUp(), hence running it as anonymous user. But that requires a hack to inject something into update_access_allowed() (and more tweaks in update.php), to simulate update_free_access. But even then the loop didn't occur in Simpletest. As we can't use state or config for the upgrade tests, the only thing that seems to work is file_put_contents() - but we have to be careful, that we don't taint the actual site when running tests. |
Failing tests? Here we go: backdrop/backdrop#5009 The approach might need discussion (using file_put_contents and seek for a special file in a special path in update_access_allowed()). Now the tests fail:
Additionally applying the change from backdrop/backdrop#5007 fixes them. Sigh... should I say: fixes them locally. 😞 Oh, GHA and simpletest... 🙄 |
I gave up. Again... 😁 I works fine locally, but not with GHA. No clue, what else to try. 🤷 This needs some smarter person, obviously. |
Crazy idea - it's extremely tricky to test this with D7 upgrades, at least with GHA. But we might be able to create a test that does anonymous update with a fully installed site. In that case we'd have states available to simulate update_free_access 🤔 |
Description of the bug
When the backup functionality was added, a regression was introduced that created an infinite loop in the first step of the update screens in core/update.php. This was reported in #6839. There is a fix for that there.
The upgrade tests (
FilledUpgradePathTestCase
,BareUpgradePathTestCase
) should have also failed because of that regression, but they did not. We discovered in #6839 that those upgrade tests are being run as user 1, instead of anonymous (which is the case in a "normal" D7 upgrade when the settingupdate_free_access
is TRUE).In that issue I tried to find a way to make these tests run as anonymous, unsuccessfully. Rather than delaying the fix, I'm opening a separate issue to fix the tests so that they fail when they are supposed to.
Steps To Reproduce
In Backdrop 1.30.0, run the tests
FilledUpgradePathTestCase
andBareUpgradePathTestCase
. The do not fail despite of the regression discussed above.Expected behavior
Those tests should fail.
Additional information
The text was updated successfully, but these errors were encountered: