/** * Logout from nodes in the node group. */ public static void logout(TestNodeGroupManager nodeGroup) { // to clear the cookie stored in service client in host, needs perform logout on all hosts nodeGroup.getAllHosts().forEach(AuthTestUtils::logout); }
/** * Logout from nodes in the node group. */ public static void logout(TestNodeGroupManager nodeGroup) { // to clear the cookie stored in service client in host, needs perform logout on all hosts nodeGroup.getAllHosts().forEach(AuthTestUtils::logout); }
public static void executeWithSystemAuthContext(Collection<ServiceHost> hosts, ExecutableBlock block) { // currently this method does not keep track of existing auth context. // If we need to recover existing auth context, retrieve and set them back in this method. Set<ServiceHost> authEnabledHosts = hosts.stream() .filter(ServiceHost::isAuthorizationEnabled) .collect(toSet()); authEnabledHosts.forEach(AuthTestUtils::setSystemAuthorizationContext); ExceptionTestUtils.executeSafely(block); authEnabledHosts.forEach(AuthTestUtils::resetAuthorizationContext); } }
public static void executeWithSystemAuthContext(Collection<ServiceHost> hosts, ExecutableBlock block) { // currently this method does not keep track of existing auth context. // If we need to recover existing auth context, retrieve and set them back in this method. Set<ServiceHost> authEnabledHosts = hosts.stream() .filter(ServiceHost::isAuthorizationEnabled) .collect(toSet()); authEnabledHosts.forEach(AuthTestUtils::setSystemAuthorizationContext); ExceptionTestUtils.executeSafely(block); authEnabledHosts.forEach(AuthTestUtils::resetAuthorizationContext); } }
Set<String> expectedOwnerIds = groupA.getAllHosts().stream() .map(ServiceHost::getId) .collect(toSet());
Set<String> expectedOwnerIds = groupA.getAllHosts().stream() .map(ServiceHost::getId) .collect(toSet());