Skip to content

Commit

Permalink
[JENKINS-24317] Amending 80f78d5.
Browse files Browse the repository at this point in the history
If we are running on a case-insensitive FS, the test makes no sense because migration would never even be attempted to begin with.
  • Loading branch information
jglick committed Aug 28, 2014
1 parent 0b72b85 commit bdc9165
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/src/test/java/hudson/model/UserTest.java
Expand Up @@ -45,6 +45,7 @@
import org.acegisecurity.context.SecurityContext;
import org.acegisecurity.context.SecurityContextHolder;
import static org.junit.Assert.*;
import static org.junit.Assume.*;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.Bug;
Expand Down Expand Up @@ -227,14 +228,12 @@ public IdStrategy getUserIdStrategy() {
@Issue("JENKINS-24317")
@LocalData
@Test public void migration() throws Exception {
assumeFalse("was not a problem on a case-insensitive FS to begin with", new File(j.jenkins.getRootDir(), "users/bob").isDirectory());
User bob = User.get("bob");
assertEquals("Bob Smith", bob.getFullName());
assertEquals("Bob Smith", User.get("Bob").getFullName());
assertEquals("nonexistent", User.get("nonexistent").getFullName());

// users/Bob is what exists in migration.zip, so lowercasing dir list to make sure the test
// is not case sensitive.
assertEquals("[bob]", Arrays.toString(new File(j.jenkins.getRootDir(), "users").list()).toLowerCase());
assertEquals("[bob]", Arrays.toString(new File(j.jenkins.getRootDir(), "users").list()));
}

@Test
Expand Down

0 comments on commit bdc9165

Please sign in to comment.