Skip to content

Commit

Permalink
fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonpoo authored and ludomikula committed Dec 16, 2024
1 parent aaa62c4 commit 5af0beb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ public record UpdatePermissionRequest(String role) {
public record CreateApplicationRequest(@JsonProperty("orgId") String organizationId,
String name,
Integer applicationType,
Map<String, Object> publishedApplicationDSL,
Map<String, Object> editingApplicationDSL,
@Nullable String folderId) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public void testCreateApplicationSuccess() {
"org01",
"app05",
ApplicationType.APPLICATION.getValue(),
Map.of("comp", "table"),
Map.of("comp", "list", "queries", Set.of(Map.of("datasourceId", datasource.getId()))),
null))
.delayUntil(__ -> deleteMono)
Expand Down Expand Up @@ -108,7 +107,6 @@ public void testUpdateApplicationFailedDueToLackOfDatasourcePermissions() {
"org01",
"app03",
ApplicationType.APPLICATION.getValue(),
Map.of("comp", "table"),
Map.of("comp", "list", "queries", Set.of(Map.of("datasourceId", datasource.getId()))),
null))
.delayUntil(__ -> deleteMono)
Expand All @@ -131,7 +129,7 @@ public void testUpdateApplicationFailedDueToLackOfDatasourcePermissions() {
@Test
@WithMockUser
public void testUpdateEditingStateSuccess() {
Mono<ApplicationView> applicationViewMono = applicationApiService.create(new CreateApplicationRequest("org01", "app1", ApplicationType.APPLICATION.getValue(), Map.of("comp", "table"), Map.of("comp", "list"), null));
Mono<ApplicationView> applicationViewMono = applicationApiService.create(new CreateApplicationRequest("org01", "app1", ApplicationType.APPLICATION.getValue(), Map.of("comp", "list"), null));
Mono<ApplicationView> updateEditStateMono = applicationViewMono.delayUntil(app -> applicationApiService.updateEditState(app.getApplicationInfoView().getApplicationId(), new ApplicationEndpoints.UpdateEditStateRequest(true)));
Mono<ApplicationView> app = updateEditStateMono.flatMap(applicationView -> applicationApiService.getEditingApplication(applicationView.getApplicationInfoView().getApplicationId()));
StepVerifier.create(app)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void testDeleteNormalApplicationWithError() {
private Mono<ApplicationView> createApplication(String name, String folderId) {
CreateApplicationRequest createApplicationRequest =
new CreateApplicationRequest("org01", name, ApplicationType.APPLICATION.getValue(),
Map.of("comp", "table"), Map.of("comp", "list"), folderId);
Map.of("comp", "list"), folderId);
return applicationApiService.create(createApplicationRequest);
}

Expand All @@ -148,7 +148,7 @@ public void testPublishApplication() {

// published dsl before publish
StepVerifier.create(applicationIdMono.flatMap(id -> applicationApiService.getPublishedApplication(id, ApplicationRequestType.PUBLIC_TO_ALL)))
.assertNext(applicationView -> Assertions.assertEquals(Map.of("comp", "table"), applicationView.getApplicationDSL()))
.assertNext(applicationView -> Assertions.assertEquals(Map.of("comp", "list"), applicationView.getApplicationDSL()))
.verifyComplete();

// publish
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;

@SpringBootTest
@ActiveProfiles("test")
@ActiveProfiles("testFolder")
//@RunWith(SpringRunner.class)
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class FolderApiServiceTest {
Expand Down

0 comments on commit 5af0beb

Please sign in to comment.