forked from dependabot/dependabot-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tests around incidental updates (dependabot#8941)
- Loading branch information
1 parent
952678a
commit 204a39c
Showing
4 changed files
with
125 additions
and
2 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
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
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,62 @@ | ||
dependabot update -f input.yml --local . --updater-image ghcr.io/dependabot/dependabot-updater-silent | ||
stdout -count=2 create_pull_request | ||
stderr 'created \| dependency-a \( from 1.2.3 to 1.2.5 \)' | ||
stderr 'created \| dependency-b \( from 1.2.3 to 1.2.5 \)' | ||
pr-created expected-1.json | ||
pr-created expected-2.json | ||
|
||
# When Dependabot goes to update dependency-a it will also bump dependency-b to the same version. | ||
# This test checks what the behavior is when using grouped updates. | ||
|
||
-- manifest.json -- | ||
{ | ||
"dependency-a": { "version": "1.2.3", "depends-on": "dependency-b" }, | ||
"dependency-b": { "version": "1.2.3" } | ||
} | ||
|
||
-- expected-1.json -- | ||
{ | ||
"dependency-a": { "version": "1.2.5", "depends-on": "dependency-b" }, | ||
"dependency-b": { "version": "1.2.5" } | ||
} | ||
|
||
-- expected-2.json -- | ||
{ | ||
"dependency-a": { "version": "1.2.3", "depends-on": "dependency-b" }, | ||
"dependency-b": { "version": "1.2.5" } | ||
} | ||
|
||
-- dependency-a -- | ||
{ | ||
"versions": [ | ||
"1.2.3", | ||
"1.2.4", | ||
"1.2.5" | ||
] | ||
} | ||
|
||
-- dependency-b -- | ||
{ | ||
"versions": [ | ||
"1.2.3", | ||
"1.2.4", | ||
"1.2.5" | ||
] | ||
} | ||
|
||
-- input.yml -- | ||
job: | ||
package-manager: "silent" | ||
source: | ||
directory: "/" | ||
provider: example | ||
hostname: example.com | ||
api-endpoint: https://example.com/api/v3 | ||
repo: dependabot/smoke-tests | ||
grouped-update: true | ||
dependency-groups: | ||
- name: first | ||
rules: | ||
update-types: | ||
- minor | ||
- patch |
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,55 @@ | ||
dependabot update -f input.yml --local . --updater-image ghcr.io/dependabot/dependabot-updater-silent | ||
stdout -count=2 create_pull_request | ||
stderr 'created \| dependency-a \( from 1.2.3 to 1.2.5 \)' | ||
stderr 'created \| dependency-b \( from 1.2.3 to 1.2.5 \)' | ||
pr-created expected-1.json | ||
pr-created expected-2.json | ||
|
||
# When Dependabot goes to update dependency-a it will also bump dependency-b to the same version. | ||
# This test checks what the behavior is when not using grouped updates. | ||
|
||
-- manifest.json -- | ||
{ | ||
"dependency-a": { "version": "1.2.3", "depends-on": "dependency-b" }, | ||
"dependency-b": { "version": "1.2.3" } | ||
} | ||
|
||
-- expected-1.json -- | ||
{ | ||
"dependency-a": { "version": "1.2.5", "depends-on": "dependency-b" }, | ||
"dependency-b": { "version": "1.2.5" } | ||
} | ||
|
||
-- expected-2.json -- | ||
{ | ||
"dependency-a": { "version": "1.2.3", "depends-on": "dependency-b" }, | ||
"dependency-b": { "version": "1.2.5" } | ||
} | ||
|
||
-- dependency-a -- | ||
{ | ||
"versions": [ | ||
"1.2.3", | ||
"1.2.4", | ||
"1.2.5" | ||
] | ||
} | ||
|
||
-- dependency-b -- | ||
{ | ||
"versions": [ | ||
"1.2.3", | ||
"1.2.4", | ||
"1.2.5" | ||
] | ||
} | ||
|
||
-- input.yml -- | ||
job: | ||
package-manager: "silent" | ||
source: | ||
directory: "/" | ||
provider: example | ||
hostname: example.com | ||
api-endpoint: https://example.com/api/v3 | ||
repo: dependabot/smoke-tests |