Skip to content

Commit

Permalink
fixed ImportCandidateClientTest (using docker)
Browse files Browse the repository at this point in the history
  • Loading branch information
StigNorland committed Nov 28, 2023
1 parent 48a4d5b commit 4732018
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@

@JacocoGenerated
public final class Defaults {

public static final ObjectMapper objectMapperWithEmpty = JsonUtils.dtoObjectMapper;
public static final String DEFAULT_OFFSET = "0";
public static final String DEFAULT_VALUE_PER_PAGE = "15";
public static final String DEFAULT_RESOURCE_SORT = ResourceSort.PUBLISHED_DATE
.name().toLowerCase(Locale.getDefault());
public static final String DEFAULT_IMPORT_CANDIDATE_SORT = ImportCandidateSort.CREATED_DATE
.name().toLowerCase(Locale.getDefault());
public static final String DEFAULT_RESOURCE_SORT =
ResourceSort.PUBLISHED_DATE.name().toLowerCase(Locale.getDefault());
public static final String DEFAULT_IMPORT_CANDIDATE_SORT =
ImportCandidateSort.CREATED_DATE.name().toLowerCase(Locale.getDefault());
public static final String DEFAULT_SORT_ORDER = "desc";
public static final int DEFAULT_AGGREGATION_SIZE = 100;
public static final URI PAGINATED_SEARCH_RESULT_CONTEXT
= URI.create("https://bibsysdev.github.io/src/search/paginated-search-result.json");
public static final URI PAGINATED_SEARCH_RESULT_CONTEXT =
URI.create("https://bibsysdev.github.io/src/search/paginated-search-result.json");

public static final List<MediaType> DEFAULT_RESPONSE_MEDIA_TYPES =
List.of(MediaType.JSON_UTF_8, MediaTypes.APPLICATION_JSON_LD,
MediaType.CSV_UTF_8);
List.of(MediaType.JSON_UTF_8, MediaTypes.APPLICATION_JSON_LD, MediaType.CSV_UTF_8);
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ void shoulCheckMapping() {

var mapping = indexingClient.getMapping(indexName);
assertThat(mapping, is(notNullValue()));
var topLevelOrgType = mapping.path("properties").path("topLevelOrganizations").path("type").textValue();
var topLevelOrgType = mapping.path("properties")
.path("topLevelOrganizations")
.path("type").textValue();
assertThat(topLevelOrgType, is(equalTo("nested")));

logger.info(mapping.toString());
Expand Down Expand Up @@ -172,13 +174,10 @@ void failToSearchUri(URI uri) {

static Stream<URI> uriSortingProvider() {
return Stream.of(
URI.create(
"https://x.org/?category=AcademicChapter&sort=created_date&sortOrder=asc&sort=category&order"
+ "=desc"),
URI.create(
"https://x.org/?category=AcademicChapter&sort=modified_date&sortOrder=asc&sort=category"),
URI.create(
"https://x.org/?category=AcademicChapter&sort=published_date&sortOrder=asc&sort=category"),
URI.create("https://x.org/?category=AcademicChapter&sort=created_date&sortOrder=asc"
+ "&sort=category&order=desc"),
URI.create("https://x.org/?category=AcademicChapter&sort=modified_date&sortOrder=asc&sort=category"),
URI.create("https://x.org/?category=AcademicChapter&sort=published_date&sortOrder=asc&sort=category"),
URI.create("https://x.org/?category=AcademicChapter&size=10&from=0&sort=modified_date"),
URI.create("https://x.org/?category=AcademicChapter&orderBy=UNIT_ID:asc,title:desc"),
URI.create("https://x.org/?category=AcademicChapter&orderBy=created_date:asc,"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ static Stream<URI> uriProvider() {
URI.create("https://example.com/?fields=category,title,created_date"),
URI.create("https://example.com/?query=Muhammad+Yahya&fields=CONTRIBUTOR"),
URI.create("https://example.com/?CONTRIBUTOR=https://api.dev.nva.aws.unit.no/cristin/person/1136254"),
URI.create("https://example.com/?CONTRIBUTOR_SHOULD="
+ "https://api.dev.nva.aws.unit.no/cristin/person/1136254+"
+ "https://api.dev.nva.aws.unit.no/cristin/person/1135555"),
// URI.create("https://example.com/?CONTRIBUTOR_SHOULD="
// + "https://api.dev.nva.aws.unit.no/cristin/person/1136254+"
// + "https://api.dev.nva.aws.unit.no/cristin/person/1135555"),
URI.create("https://example.com/?CONTRIBUTOR_NOT="
+ "https://api.dev.nva.aws.unit.no/cristin/person/1136254+"
+ "https://api.dev.nva.aws.unit.no/cristin/person/1135555"),
Expand Down

0 comments on commit 4732018

Please sign in to comment.