Skip to content

Commit

Permalink
Reset IZH
Browse files Browse the repository at this point in the history
  • Loading branch information
fhanik committed May 12, 2017
1 parent 3e88ce8 commit 7db5e58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
import org.cloudfoundry.identity.uaa.login.saml.SamlIdentityProviderDefinition;
import org.cloudfoundry.identity.uaa.zone.IdentityProvider;
import org.cloudfoundry.identity.uaa.zone.IdentityZone;
import org.cloudfoundry.identity.uaa.zone.IdentityZoneHolder;
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.oauth2.common.util.RandomValueStringGenerator;

import java.util.ArrayList;
Expand Down Expand Up @@ -53,6 +55,8 @@ public class IdentityProviderModifiedEventTest {

@Before
public void setup() {
IdentityZoneHolder.clear();
SecurityContextHolder.clearContext();
String origin = "idp-mock-saml-"+new RandomValueStringGenerator().generate();
String metadata = String.format(xmlWithoutID, "http://localhost:9999/metadata/"+origin);
provider = new IdentityProvider<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@

import org.cloudfoundry.identity.uaa.config.IdentityZoneConfiguration;
import org.cloudfoundry.identity.uaa.zone.IdentityZone;
import org.cloudfoundry.identity.uaa.zone.IdentityZoneHolder;
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.core.context.SecurityContextHolder;

import static org.junit.Assert.assertEquals;

Expand All @@ -29,6 +31,8 @@ public class IdentityZoneModifiedEventTest {

@Before
public void setup() {
IdentityZoneHolder.clear();
SecurityContextHolder.clearContext();
zone = new IdentityZone();
zone.setId("id");
zone.setSubdomain("subdomain");
Expand Down

0 comments on commit 7db5e58

Please sign in to comment.