Commit dad4806c authored by Kristel Meikas's avatar Kristel Meikas
Browse files

Merge branch 'TEIS-3118' into 'develop'

TEIS-3118: added DDD to allowed extensions for file upload

Closes TEIS-3118

See merge request teis/admin-service!85
parents 0027cf06 6108288f
......@@ -21,7 +21,7 @@ import static java.util.Collections.emptyList;
import static java.util.UUID.randomUUID;
import static org.assertj.core.api.Assertions.assertThat;
public class DeadlineListenerTests extends AdminAppTestBase {
class DeadlineListenerTests extends AdminAppTestBase {
@Autowired
DeadlineListener deadlineListener;
......
......@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import static ee.sm.ti.teis.utils.TestUtils.assertBadRequest;
import static org.assertj.core.api.Assertions.assertThat;
public class FeatureFlagMsListenerTest extends AdminAppTestBase {
class FeatureFlagMsListenerTest extends AdminAppTestBase {
@Autowired
FeatureFlagMsListener listener;
......
......@@ -13,7 +13,7 @@ import static ee.sm.ti.teis.utils.TestUtils.assertResponseNotFound;
import static org.assertj.core.api.Assertions.assertThat;
import static org.testcontainers.shaded.org.apache.commons.lang.RandomStringUtils.random;
public class GetFeatureFlagGwListenerTest extends AdminAppTestBase {
class GetFeatureFlagGwListenerTest extends AdminAppTestBase {
private static final String FLAG_ID = "X-TEST-1";
......
......@@ -24,7 +24,7 @@ import static java.util.Collections.emptyList;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
public class AdminParameterGwListenerTest extends AdminAppTestBase {
class AdminParameterGwListenerTest extends AdminAppTestBase {
@Autowired
ParameterGwListener listener;
......
......@@ -21,7 +21,7 @@ import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
public class ParameterGwListenerTest extends AdminAppTestBase {
class ParameterGwListenerTest extends AdminAppTestBase {
public static final String PARAMETER_CODE_TEHIK = "X-TEST-TEHIK_URL";
public static final String PARAMETER_CODE_TEHIK_NAME = "TEHIK homepage URL";
......@@ -53,7 +53,7 @@ public class ParameterGwListenerTest extends AdminAppTestBase {
ParametersResponse response = listener.getParameters(parametersRequest);
assertThat(response.getPayload().size()).isGreaterThanOrEqualTo(2);
assertThat(response.getPayload()).hasSizeGreaterThanOrEqualTo(2);
assertThat(response.getPayload()).extracting("code").contains(PARAMETER_CODE_TEHIK, PARAMETER_CODE_NETI, PARAMETER_CODE_TRIPLEDEV);
assertThat(response.getPayload()).extracting("code").doesNotContain(PARAMETER_CODE_TEATMIK, PARAMETER_CODE_GOOGLE);
......@@ -73,7 +73,7 @@ public class ParameterGwListenerTest extends AdminAppTestBase {
ParametersResponse response = listener.getParameters(parametersRequest);
assertThat(response.getPayload().size()).isGreaterThanOrEqualTo(3);
assertThat(response.getPayload()).hasSizeGreaterThanOrEqualTo(3);
assertThat(response.getPayload()).extracting("code").contains(PARAMETER_CODE_TEHIK,
PARAMETER_CODE_TEATMIK, PARAMETER_CODE_ITI, PARAMETER_CODE_TRIPLEDEV);
assertThat(response.getPayload()).extracting("code").doesNotContain(PARAMETER_CODE_NETI, PARAMETER_CODE_GOOGLE);
......@@ -94,7 +94,7 @@ public class ParameterGwListenerTest extends AdminAppTestBase {
ParametersResponse response = listener.getParameters(parametersRequest);
assertThat(response.getPayload().size()).isGreaterThanOrEqualTo(5);
assertThat(response.getPayload()).hasSizeGreaterThanOrEqualTo(5);
assertThat(response.getPayload()).extracting("code").contains(PARAMETER_CODE_TEHIK,
PARAMETER_CODE_TEATMIK, PARAMETER_CODE_ITI, PARAMETER_CODE_NETI, PARAMETER_CODE_GOOGLE, PARAMETER_CODE_TRIPLEDEV);
}
......
......@@ -21,7 +21,7 @@ import static ee.sm.ti.teis.types.enums.ScopeType.*;
import static ee.sm.ti.teis.utils.TestUtils.assertBadRequest;
import static org.assertj.core.api.Assertions.assertThat;
public class ParameterMsListenerTest extends AdminAppTestBase {
class ParameterMsListenerTest extends AdminAppTestBase {
@Autowired
ParameterMsListener listener;
......@@ -42,7 +42,7 @@ public class ParameterMsListenerTest extends AdminAppTestBase {
ParametersMsResponse response = listener.getParameters(request);
assertThat(response.getPayload().size()).isGreaterThanOrEqualTo(5);
assertThat(response.getPayload()).hasSizeGreaterThanOrEqualTo(5);
assertThat(response.getPayload()).extracting("code").contains(PARAMETER_CODE_TEHIK,
"LEGAL_PERSON_TEATMIK_WEB_LINK", "LEGAL_PERSON_ITI_WEB_LINK", "X-TEST-NETI_URL", "X-TEST-GOOGLE_URL");
}
......@@ -53,7 +53,7 @@ public class ParameterMsListenerTest extends AdminAppTestBase {
ParametersMsResponse response = listener.getParameters(request);
assertThat(response.getPayload().size()).isGreaterThanOrEqualTo(5);
assertThat(response.getPayload()).hasSizeGreaterThanOrEqualTo(5);
assertThat(response.getPayload()).extracting("code").contains(PARAMETER_CODE_TEHIK,
"LEGAL_PERSON_TEATMIK_WEB_LINK", "LEGAL_PERSON_ITI_WEB_LINK", "X-TEST-NETI_URL", "X-TEST-GOOGLE_URL");
}
......
......@@ -23,7 +23,7 @@ import static java.util.Collections.emptyList;
import static java.util.UUID.randomUUID;
import static org.assertj.core.api.Assertions.assertThat;
public class UpdateParameterValueGwListenerTest extends AdminAppTestBase {
class UpdateParameterValueGwListenerTest extends AdminAppTestBase {
@Autowired
ParameterGwListener listener;
......
......@@ -16,7 +16,7 @@ import java.util.UUID;
import static ee.sm.ti.teis.types.enums.classifier.ObjectType.*;
import static org.assertj.core.api.Assertions.assertThat;
public class PathListenerTest extends AdminAppTestBase {
class PathListenerTest extends AdminAppTestBase {
private static final String PATH_END = "general";
private static final String AUTH_PROCEEDINGS_URL = "/auth/proceedings/";
......
......@@ -16,7 +16,7 @@ import java.util.UUID;
import static org.assertj.core.api.Assertions.assertThat;
public class PathMsListenerTest extends AdminAppTestBase {
class PathMsListenerTest extends AdminAppTestBase {
private static final String PATH_END = "general";
private static final String AUTH_PROCEEDINGS_URL = "/auth/proceedings/";
......
--liquibase formatted sql
--changeset kristel:2022-05-16.TEIS-3118.update-file-upload-allowed-extensions
UPDATE parameter
SET value = 'gif, jpg, png, jpeg, tif, jfif, doc, docx, pdf, xls, xlsx, odt, ods, txt, rtf, cdoc, ddoc, bdoc, asice, sce, xps, csv, xml, htm, html, msg, zip, ddd'
WHERE code = 'FILE_UPLOAD_ALLOWED_EXTENSIONS';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment