Skip to content
Browse files
[JENKINS-47909] Migration test.
  • Loading branch information
jglick committed Nov 9, 2017
1 parent b675122 commit e2d36820da22b734f1bce92545a950ab97d39f8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
@@ -813,6 +813,18 @@ public void emptyUsernameConfigMigrated() {
assertThat(empty.getFullName(), equalTo("Empty"));

public void shellyUsernameMigrated() {
File rootDir = new File(Jenkins.getInstance().getRootDir(), "users");
User user = User.getById("bla$", false);
assertCorrectConfig(user, "users/bla$");
assertFalse(new File(rootDir, "bla$").exists());
assertThat(user.getFullName(), equalTo("Weird Username"));

private static void assertCorrectConfig(User user, String unixPath) {
assertThat(user.getConfigFile().getFile().getPath(), endsWith(unixPath.replace('/', File.separatorChar)));
Binary file not shown.

0 comments on commit e2d3682

Please sign in to comment.