Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upate tests for export workspace images #80

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ public Response exportWorkspacesByNames(ExportWorkspacesRequestDTOV1 request) {
if (data.isEmpty()) {
return Response.status(Response.Status.NOT_FOUND).build();
}

var images = imageDAO.findByRefIds(request.getNames());
var images = imageDAO.findByRefIds(data.keySet());
return Response.ok(mapper.create(data, images)).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ void exportWorkspaceTest() {
new EximMicrofrontendDTOV1().appId("theme").basePath("/theme"))));

assertThat(w.getSlots()).isNotNull().isNotEmpty().hasSize(3);

assertThat(w.getImages()).isNotNull().isNotEmpty().hasSize(2);
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/data/testdata-exim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<WORKSPACE guid="33-111" optlock="0" company_name="Company4" theme="22-222" description="Company4 test" home_page="main_page" name="test04" phone_number="606450342" rss_feed_url="url.com" city="Poznan" country="Poland" base_url="/company4" postalcode="56-789" street="Kolorowa" streetno="6" tenant_id="tenant-200"/>
<WORKSPACE guid="33-222" optlock="0" company_name="Company5" theme="22-222" description="Company5 Test" home_page="main_page" name="test05" phone_number="3856382" rss_feed_url="url.com" city="Berlin" country="Germany" base_url="/company5" postalcode="12-345" street="Unter den Linden" streetno="23" tenant_id="tenant-200"/>

<IMAGE guid="i1" optlock="0" mime_type="image/x-icon" data_length="3" data="123456667890123456" ref_type="favicon" ref_id="11-111" tenant_id="tenant-100" />
<IMAGE guid="i3" optlock="0" mime_type="image/png" data_length="3" data="123456667890123456" ref_type="logo" ref_id="11-111" tenant_id="tenant-100" />
<IMAGE guid="i1" optlock="0" mime_type="image/x-icon" data_length="3" data="123456667890123456" ref_type="favicon" ref_id="test01" tenant_id="tenant-100" />
<IMAGE guid="i3" optlock="0" mime_type="image/png" data_length="3" data="123456667890123456" ref_type="logo" ref_id="test01" tenant_id="tenant-100" />

<!-- PRODUCT -->
<PRODUCT guid="1234" optlock="10" workspace_guid="11-111" product_name="onecx-core" base_url="/core" tenant_id="tenant-100"/>
Expand Down
Loading