integrate-sha512-password-hashing #68
@ -93,7 +93,6 @@ public abstract class HsEntityValidator<E extends PropertiesProvider> {
|
|||||||
public Map<String, Object> revampProperties(final E entity, final Map<String, Object> config) {
|
public Map<String, Object> revampProperties(final E entity, final Map<String, Object> config) {
|
||||||
final var copy = new HashMap<>(config);
|
final var copy = new HashMap<>(config);
|
||||||
stream(propertyValidators).forEach(p -> {
|
stream(propertyValidators).forEach(p -> {
|
||||||
// FIXME: maybe move to ValidatableProperty.postProcess(...)?
|
|
||||||
if ( p.isWriteOnly()) {
|
if ( p.isWriteOnly()) {
|
||||||
copy.remove(p.propertyName);
|
copy.remove(p.propertyName);
|
||||||
} else if (p.isComputed()) {
|
} else if (p.isComputed()) {
|
||||||
|
@ -5,6 +5,7 @@ import net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType;
|
|||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static net.hostsharing.hsadminng.hs.booking.item.TestHsBookingItem.TEST_MANAGED_SERVER_BOOKING_ITEM;
|
import static net.hostsharing.hsadminng.hs.booking.item.TestHsBookingItem.TEST_MANAGED_SERVER_BOOKING_ITEM;
|
||||||
import static net.hostsharing.hsadminng.hs.booking.item.TestHsBookingItem.TEST_MANAGED_WEBSPACE_BOOKING_ITEM;
|
import static net.hostsharing.hsadminng.hs.booking.item.TestHsBookingItem.TEST_MANAGED_WEBSPACE_BOOKING_ITEM;
|
||||||
@ -46,7 +47,10 @@ class HsUnixUserHostingAssetValidatorUnitTest {
|
|||||||
final var validator = HsHostingAssetEntityValidatorRegistry.forType(unixUserHostingAsset.getType());
|
final var validator = HsHostingAssetEntityValidatorRegistry.forType(unixUserHostingAsset.getType());
|
||||||
|
|
||||||
// when
|
// when
|
||||||
final var result = validator.validateEntity(unixUserHostingAsset); // FIXME: validateContext
|
final var result = Stream.concat(
|
||||||
|
validator.validateEntity(unixUserHostingAsset).stream(),
|
||||||
|
validator.validateContext(unixUserHostingAsset).stream()
|
||||||
|
).toList();
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assertThat(result).isEmpty();
|
assertThat(result).isEmpty();
|
||||||
|
Loading…
Reference in New Issue
Block a user