Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
automatic_updates
Merge requests
!522
Issue
#3276645
: Run readiness checks after stored results have been cleared in certain situations
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3276645
: Run readiness checks after stored results have been cleared in certain situations
issue/automatic_updates-3276645:3276645-run-readiness-checks
into
8.x-2.x
Overview
40
Commits
22
Pipelines
1
Changes
1
Merged
Yash Rode
requested to merge
issue/automatic_updates-3276645:3276645-run-readiness-checks
into
8.x-2.x
2 years ago
Overview
40
Commits
22
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Viewing commit
842592c7
Show latest version
1 file
+
32
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
842592c7
seperate test coverage
· 842592c7
Yash Rode
authored
2 years ago
automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
+
32
−
0
Options
@@ -218,6 +218,38 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$assert_session
->
pageTextNotContains
(
'Your site has not recently run an update readiness check. Run readiness checks now.'
);
}
/**
* Tests status checks are run after an update.
*/
public
function
testStatusCheckerRunAfterUpdate
():
void
{
$this
->
useFixtureDirectoryAsStaged
(
__DIR__
.
'/../../fixtures/stage_composer/semver_test'
);
$this
->
setReleaseMetadata
(
__DIR__
.
'/../../fixtures/release-history/semver_test.1.1.xml'
);
$this
->
setProjectInstalledVersion
([
'semver_test'
=>
'8.1.0'
]);
$this
->
checkForUpdates
();
$page
=
$this
->
getSession
()
->
getPage
();
// Navigate to the automatic updates form.
$this
->
drupalGet
(
'/admin/modules/automatic-update-extensions'
);
$assert_session
=
$this
->
assertSession
();
$assert_session
->
pageTextNotContains
(
static
::
$errorsExplanation
);
$assert_session
->
pageTextNotContains
(
static
::
$warningsExplanation
);
$this
->
assertTableShowsUpdates
(
'Semver Test'
,
'8.1.0'
,
'8.1.1'
);
$this
->
assertUpdatesCount
(
1
);
$page
->
checkField
(
'projects[semver_test]'
);
TestSubscriber1
::
setTestResult
([
ValidationResult
::
createError
([
'Error before continue.'
])],
StatusCheckEvent
::
class
);
$page
->
pressButton
(
'Update'
);
$this
->
checkForMetaRefresh
();
$this
->
assertUpdateStagedTimes
(
1
);
$page
->
pressButton
(
'Continue'
);
$this
->
checkForMetaRefresh
();
$assert_session
->
addressEquals
(
'/admin/reports/updates'
);
$assert_session
->
pageTextContainsOnce
(
'Update complete!'
);
// Status checks should display messages on admin page.
$this
->
drupalGet
(
'/admin'
);
$assert_session
->
pageTextContains
(
'Error before continue.'
);
$assert_session
->
pageTextNotContains
(
'Your site has not recently run an update readiness check. Run readiness checks now.'
);
}
/**
* Tests that an exception is thrown if a previous apply failed.
*/
Loading