-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds error handlers for gp_modules major exceptions
- Loading branch information
1 parent
f3327e0
commit e81cd8f
Showing
2 changed files
with
47 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -953,6 +953,35 @@ | |
expect(error.message).to include("write error. Out of diskspace") | ||
end | ||
end | ||
|
||
it "detects 'ambiguous package'" do | ||
stderr = <<~ERROR | ||
go: downloading google.golang.org/grpc v1.70.0 | ||
go: github.com/terraform-linters/tflint imports | ||
github.com/terraform-linters/tflint/cmd imports | ||
github.com/terraform-linters/tflint-ruleset-terraform/rules imports | ||
github.com/hashicorp/go-getter imports | ||
cloud.google.com/go/storage imports | ||
google.golang.org: ambiguous import: found package google.golang.org/grpc/stats/otl in multiple modules: | ||
google.golang.org/grpc v1.69.2 (/home/dependabot/go/pkg/mod/stats/opentelemetry) | ||
ERROR | ||
|
||
expect do | ||
updater.send(:handle_subprocess_error, stderr) | ||
end.to raise_error(Dependabot::DependencyFileNotResolvable) | ||
end | ||
|
||
it "detects 'ToolVersionNotSupported'" do | ||
stderr = <<~ERROR | ||
go: downloading google.golang.org/grpc v1.67.3 | ||
go: downloading google.golang.org/grpc v1.70.0 | ||
go: google.golang.org/grpc/stats/[email protected] requires go >= 1.22.7 (running go 1.22.5; CUAIN=local+auto) | ||
ERROR | ||
|
||
expect do | ||
updater.send(:handle_subprocess_error, stderr) | ||
end.to raise_error(Dependabot::ToolVersionNotSupported) | ||
end | ||
end | ||
end | ||
end |