Skip to content

Add mising test case and migration #1394

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

Merged
merged 1 commit into from
Dec 19, 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 @@ -451,6 +451,10 @@ public void publishedToRecord(MongockTemplate mongoTemplate, CommonConfig common
mongoTemplate.insert(record);
}
}
@ChangeSet(order = "029", id = "add-tag-index-to-record", author = "Thomas")
public void addTagIndexToRecord(MongockTemplate mongoTemplate, CommonConfig commonConfig) {
ensureIndexes(mongoTemplate, ApplicationRecord.class, makeIndex("applicationId", "tag").unique());
}

private void addGidField(MongockTemplate mongoTemplate, String collectionName) {
// Create a query to match all documents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void testPublishApplication() {
.assertNext(applicationView -> Assertions.assertEquals(Map.of("comp", "list"), applicationView.getApplicationDSL()))
.verifyComplete();

// publish
// publish 2
applicationIdMono = applicationIdMono
.delayUntil(id -> applicationApiService.publish(id, new ApplicationPublishRequest("Test Publish 2", "2.0.0"))).cache();

Expand All @@ -192,6 +192,14 @@ public void testPublishApplication() {
StepVerifier.create(applicationIdMono.flatMap(id -> applicationApiService.getPublishedApplication(id, ApplicationRequestType.PUBLIC_TO_ALL)))
.assertNext(applicationView -> Assertions.assertEquals(Map.of("comp", "table"), applicationView.getApplicationDSL()))
.verifyComplete();

// publish 3
applicationIdMono = applicationIdMono
.delayUntil(id -> applicationApiService.publish(id, new ApplicationPublishRequest("Same tag", "2.0.0"))).cache();

// Error
StepVerifier.create(applicationIdMono)
.verifyError();
}

@Test
Expand Down
Loading