Skip to content

Commit

Permalink
test: remove error string matching (#861)
Browse files Browse the repository at this point in the history
It looks like the text for this error on the backend has changed
(sometimes) from "Precondition Failed" to "At least one of the
pre-conditions you specified did not hold". I don't think it's
really necessary to check the exact message in any case given
that we do check for a code of 412, which implies a precondition
failure. I added a check of the error Reason instead,  which is more
standardized.

Fixes #853
  • Loading branch information
tritone authored and danielduhh committed Jun 17, 2021
1 parent 89b8a09 commit 80984a6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,7 @@ public void testBlobReload() throws Exception {
fail("StorageException was expected");
} catch (StorageException e) {
assertEquals(412, e.getCode());
assertEquals("Precondition Failed", e.getMessage());
assertEquals("conditionNotMet", e.getReason());
}

Blob updated = blob.reload();
Expand Down

0 comments on commit 80984a6

Please sign in to comment.