Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ public void testpopulateCredentials() throws Exception {
Files.write(temp.toPath(), lines, StandardCharsets.UTF_8);
File baseDir = null;
try {
baseDir = new File("/tmp/autossl-test-" + UUID.randomUUID());
if (!baseDir.mkdir()) {
throw new IOException("failed to create base directory");
}
baseDir = Files.createTempDirectory("autossl-test").toFile();
AutoSSL assl = new TestAutoSSL(baseDir.getPath());

LOG.debug("base dir is; " + baseDir);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import org.apache.storm.utils.Time.SimulatedTime;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
Expand Down Expand Up @@ -57,6 +59,7 @@ public void setUp() {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void testCanGetGroups() throws Exception {
try (SimulatedTime ignored = new SimulatedTime()) {
groupsMapping.prepare(topoConf);
Expand All @@ -69,6 +72,7 @@ public void testCanGetGroups() throws Exception {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void testWillCacheGroups() throws Exception {
try (SimulatedTime ignored = new SimulatedTime()) {
groupsMapping.prepare(topoConf);
Expand All @@ -82,6 +86,7 @@ public void testWillCacheGroups() throws Exception {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void testWillExpireCache() throws Exception {
try (SimulatedTime ignored = new SimulatedTime()) {
groupsMapping.prepare(topoConf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import org.apache.storm.security.auth.ReqContext;
import org.apache.storm.utils.ConfigUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

import javax.security.auth.Subject;
import java.security.Principal;
Expand All @@ -34,6 +36,7 @@
public class SimpleACLAuthorizerTest {

@Test
@DisabledOnOs(OS.WINDOWS)
public void SimpleACLUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
Collection<String> adminUserSet = new HashSet<>(Collections.singletonList("admin"));
Expand Down Expand Up @@ -196,6 +199,7 @@ public void SimpleACLUserAuthTest() {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void SimpleACLNimbusUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
Collection<String> adminUserSet = new HashSet<>(Collections.singletonList("admin"));
Expand All @@ -222,6 +226,7 @@ public void SimpleACLNimbusUserAuthTest() {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void SimpleACLTopologyReadOnlyUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
import org.apache.storm.utils.Time;
import org.apache.storm.utils.Utils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -401,6 +403,7 @@ public void positiveWhitelistAuthroizationTest() {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void simpleAclUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
clusterConf.put(Config.NIMBUS_ADMINS, Collections.singletonList("admin"));
Expand Down Expand Up @@ -489,6 +492,7 @@ public void simpleAclUserAuthTest() {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void simpleAclNimbusUsersAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
clusterConf.put(Config.NIMBUS_ADMINS, Collections.singletonList("admin"));
Expand Down Expand Up @@ -546,6 +550,7 @@ public void simpleAclNimbusGroupsAuthTest() {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void simpleAclSameUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
clusterConf.put(Config.NIMBUS_ADMINS, Collections.singletonList("admin"));
Expand Down Expand Up @@ -575,6 +580,7 @@ public void simpleAclSameUserAuthTest() {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void shellBaseGroupsMappingTest() throws Exception {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
ShellBasedGroupsMapping groups = new ShellBasedGroupsMapping();
Expand All @@ -595,6 +601,7 @@ public void getTransportPluginThrowsRunimeTest() {
}

@Test
@DisabledOnOs(OS.WINDOWS)
public void impersonationAuthorizerTest() throws Exception {
final String impersonatingUser = "admin";
final String userBeingImpersonated = System.getProperty("user.name");
Expand Down
Loading