Skip to content

Commit

Permalink
Register new GCE reservations error message regexp to correctly categ…
Browse files Browse the repository at this point in the history
…orize correctly.
  • Loading branch information
mtrqq committed Sep 23, 2024
1 parent 7c86e28 commit 552f49f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ var (
regexp.MustCompile("Reservation (.*) is incorrect for the requested resources"),
regexp.MustCompile("Zone does not currently have sufficient capacity for the requested resources"),
regexp.MustCompile("Reservation (.*) does not have sufficient capacity for the requested resources."),
regexp.MustCompile("Specified reservation (.*) does not have available resources for the request."),
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ func TestErrors(t *testing.T) {
expectedErrorCode: "OTHER",
expectedErrorClass: cloudprovider.OtherErrorClass,
},
{
errorCodes: []string{"CONDITION_NOT_MET"},
errorMessage: "Specified reservation 'rsv-name' does not have available resources for the request.",
expectedErrorCode: "INVALID_RESERVATION",
expectedErrorClass: cloudprovider.OtherErrorClass,
},
}
for _, tc := range testCases {
for _, errorCode := range tc.errorCodes {
Expand Down

0 comments on commit 552f49f

Please sign in to comment.