Skip to content

Commit

Permalink
Check message instead of toString for DS_Store test
Browse files Browse the repository at this point in the history
The plugin service special cases .DS_Store on MacOS, to not think it is
a plugin. The tests for this behavior also check an appropriate error
occurs on non macos systems. On Linux, the test checks the exception
message, but uses toString(), which uses a localized version of the
exception message. This commit changes the test to instead check the
exception message directly, so as not to depend on the locale.

closes elastic#41689
  • Loading branch information
rjernst committed May 31, 2019
1 parent 8e5812c commit 25ef3df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void testDesktopServicesStoreFiles() throws IOException {
if (Constants.WINDOWS) {
assertThat(e.getCause(), instanceOf(NoSuchFileException.class));
} else {
assertThat(e.getCause(), hasToString(containsString("Not a directory")));
assertThat(e.getCause().getMessage(), containsString("Not a directory"));
}
}
}
Expand Down

0 comments on commit 25ef3df

Please sign in to comment.