-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add and update tests around group update failures (#9363)
- Loading branch information
1 parent
3b1250b
commit 634b2fa
Showing
3 changed files
with
128 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
! dependabot update -f input.yml --local . --updater-image ghcr.io/dependabot/dependabot-updater-silent | ||
# It fails to update "dont-update-any-files" | ||
stdout -count=1 record_update_job_error | ||
|
||
# It updates "dependency-a" to 1.3.0 | ||
stdout -count=1 create_pull_request | ||
|
||
stderr -count=1 'Error processing dont-update-any-files' | ||
pr-created expected.json | ||
|
||
# Testing if one dependency fails to update, the other dependencies are still updated in a grouped update. | ||
# See the silent ecosystem code for special handling of a dependency named "dont-update-any-files". | ||
|
||
-- manifest.json -- | ||
{ | ||
"dependency-a": { "version": "1.2.3"}, | ||
"dont-update-any-files": { "version": "1.0.0" } | ||
} | ||
|
||
-- expected.json -- | ||
{ | ||
"dependency-a": { "version": "1.3.0"}, | ||
"dont-update-any-files": { "version": "1.0.0" } | ||
} | ||
|
||
-- dont-update-any-files -- | ||
{ | ||
"versions": [ | ||
"1.0.0", | ||
"1.0.1" | ||
] | ||
} | ||
|
||
-- dependency-a -- | ||
{ | ||
"versions": [ | ||
"1.2.3", | ||
"1.2.4", | ||
"1.3.0" | ||
] | ||
} | ||
|
||
-- input.yml -- | ||
job: | ||
package-manager: "silent" | ||
source: | ||
directory: "/" | ||
provider: example | ||
hostname: example.com | ||
api-endpoint: https://example.com/api/v3 | ||
repo: dependabot/smoke-tests | ||
dependency-groups: | ||
- name: dev | ||
rules: | ||
# specifically not using semver rules (update-types) for this test | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
! dependabot update -f input.yml --local . --updater-image ghcr.io/dependabot/dependabot-updater-silent | ||
# It fails to update "dont-update-any-files" | ||
stdout -count=1 record_update_job_error | ||
|
||
# It closes the previous PR since it no longer includes "dont-update-any-files" | ||
stdout -count=1 close_pull_request | ||
|
||
# It creates a new PR with the updated "dependency-a" | ||
stdout -count=1 create_pull_request | ||
|
||
stderr 'Error processing dont-update-any-files' | ||
pr-created expected.json | ||
|
||
# Testing what happens when a rebase job fails to update one dependency. | ||
# See the silent ecosystem code for special handling of a dependency named "dont-update-any-files". | ||
|
||
-- manifest.json -- | ||
{ | ||
"dependency-a": { "version": "1.2.3"}, | ||
"dont-update-any-files": {"version": "1.0.0"} | ||
} | ||
|
||
-- expected.json -- | ||
{ | ||
"dependency-a": { "version": "1.3.0"}, | ||
"dont-update-any-files": {"version": "1.0.0"} | ||
} | ||
|
||
-- dont-update-any-files -- | ||
{ | ||
"versions": [ | ||
"1.0.0", | ||
"1.0.1" | ||
] | ||
} | ||
|
||
-- dependency-a -- | ||
{ | ||
"versions": [ | ||
"1.2.3", | ||
"1.2.4", | ||
"1.3.0" | ||
] | ||
} | ||
|
||
-- input.yml -- | ||
job: | ||
package-manager: "silent" | ||
source: | ||
directory: "/" | ||
provider: example | ||
hostname: example.com | ||
api-endpoint: https://example.com/api/v3 | ||
repo: dependabot/smoke-tests | ||
dependency-groups: | ||
- name: all-group | ||
rules: | ||
patterns: | ||
- "*" | ||
dependencies: | ||
- dependency-a | ||
- dont-update-any-files | ||
updating-a-pull-request: true | ||
dependency-group-to-refresh: all-group | ||
existing-group-pull-requests: | ||
- dependency-group-name: all-group | ||
dependencies: | ||
- dependency-name: dependency-a | ||
dependency-version: 1.2.0 | ||
- dependency-name: dont-update-any-files | ||
dependency-version: 0.9.0 |
This file was deleted.
Oops, something went wrong.