Skip to content
Snippets Groups Projects
Commit 5c780b38 authored by Shawn Pearce's avatar Shawn Pearce
Browse files

Fix unit tests using MockSystemReader with user configuation


Since cc905e7d "Make Repository.getConfig aware of changed config"
its invalid to have a null result from FileBasedConfig.getFile(), as
the path is used to stat the location on disk before returning the
Config object from Repository.getConfig().

Mock out the isOutdated() method to return false all of the time
in the mock test environment, so we don't crash with an NPE when
this mock user configuration is being called.

Change-Id: I0b4d9cbd346d5dc225ec12674da905c35457fa7c
Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
parent 6da38b94
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,13 @@ public MockSystemReader() {
@Override
public void load() throws IOException, ConfigInvalidException {
// Do nothing
}};
}
@Override
public boolean isOutdated() {
return false;
}
};
}
private void init(final String n) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment