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 committed Jun 7, 2021
1 parent f549173 commit 146a3d3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -3370,7 +3370,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 146a3d3

Please sign in to comment.