Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Oct 5, 2023
2 parents 1153b1c + ba90363 commit b5349d0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private boolean severalLoginFormModulesExist() {
if (authentication instanceof MidpointAuthentication mpAuthentication) {
int loginFormModulesCount = (int) mpAuthentication.getAuthModules()
.stream()
.filter(module -> isModuleApplicable(module.getBaseModuleAuthentication()))
.filter(module -> module != null && isModuleApplicable(module.getBaseModuleAuthentication()))
.count();
return loginFormModulesCount > 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@

package com.evolveum.midpoint.ninja;

import com.evolveum.midpoint.repo.api.RepositoryService;
import com.evolveum.midpoint.test.util.AbstractSpringTest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.testng.SkipException;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
Expand All @@ -19,29 +24,32 @@
@ContextConfiguration(locations = "classpath:ctx-ninja-test.xml")
@DirtiesContext
@Listeners({ com.evolveum.midpoint.tools.testng.AlphabeticalMethodInterceptor.class })
public class JenkinsTest extends NinjaSpringTest {

private static final Trace LOGGER = TraceManager.getTrace(JenkinsTest.class);

@BeforeClass(alwaysRun = true, dependsOnMethods = "springTestContextBeforeTestClass")
protected void springTestContextPrepareTestInstance() throws Exception {
LOGGER.info("springTestContextPrepareTestInstance started");
super.springTestContextPrepareTestInstance();
LOGGER.info("springTestContextPrepareTestInstance finished");
}

@BeforeClass
@Override
public void beforeClass() throws Exception {
LOGGER.info("beforeClass started");
super.beforeClass();
LOGGER.info("beforeClass finished");
}

@BeforeClass
public class JenkinsTest extends AbstractSpringTest {

@Autowired
private RepositoryService repositoryService;

// private static final Trace LOGGER = TraceManager.getTrace(JenkinsTest.class);
//
// @BeforeClass(alwaysRun = true, dependsOnMethods = "springTestContextBeforeTestClass")
// protected void springTestContextPrepareTestInstance() throws Exception {
// LOGGER.info("springTestContextPrepareTestInstance started");
// super.springTestContextPrepareTestInstance();
// LOGGER.info("springTestContextPrepareTestInstance finished");
// }
//
// @BeforeClass
// @Override
// public void beforeClass() throws Exception {
// LOGGER.info("beforeClass started");
// super.beforeClass();
// LOGGER.info("beforeClass finished");
// }

@Test
public void emptyTest() throws Exception {

if (!repositoryService.isNative()) {
throw new SkipException("skipped");
}
}
}

0 comments on commit b5349d0

Please sign in to comment.