Skip to content

Commit

Permalink
KNOX-2662 - Added TLS certs into General Proxy Information for the to…
Browse files Browse the repository at this point in the history
…ken profile (apache#493)
  • Loading branch information
smolnar82 authored Sep 14, 2021
1 parent a0cb4e9 commit 9518b43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ public static Collection<String> getThinProfileElemens() {
}

public static Collection<String> getTokenProfileElements() {
return Arrays.asList(GPI_VERSION, GPI_TOKENS);
return Arrays.asList(GPI_VERSION, GPI_CERT, GPI_TOKENS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import static org.junit.Assert.assertTrue;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;

import org.junit.Test;
Expand Down Expand Up @@ -71,6 +72,13 @@ public void testGeneralProxyInformationTokens() throws Exception {
doTestGeneralProxyInformationElement(HomePageProfile.GPI_TOKENS);
}

@Test
public void testTokenProfileElements() throws Exception {
final Collection<String> tokenProfileElements = HomePageProfile.getTokenProfileElements();
assertEquals(3, tokenProfileElements.size());
assertTrue(tokenProfileElements.containsAll(Arrays.asList(HomePageProfile.GPI_VERSION, HomePageProfile.GPI_CERT, HomePageProfile.GPI_TOKENS)));
}

private void doTestGeneralProxyInformationElement(String gpiElement) {
final HomePageProfile profile = new HomePageProfile(Arrays.asList(gpiElement));
assertTrue(Boolean.parseBoolean(profile.getProfileElements().get(gpiElement)));
Expand Down

0 comments on commit 9518b43

Please sign in to comment.