Skip to content

Commit

Permalink
chore: test failre
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiin Kim authored and Jiin Kim committed Dec 24, 2024
1 parent 837ca2a commit 93e63c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ jobs:
- name: Start docker compose services
run: |
docker compose -f docker-compose.test.yml up -d
echo "Waiting for MongoDB to be ready..."
timeout 30 bash -c 'until docker compose -f docker-compose.test.yml logs mongod | grep "Waiting for connections"; do sleep 1; done'
echo "MongoDB is ready"
- name: Build and Test
run: ./gradlew build --no-daemon
run: |
./gradlew test --info --stacktrace
- name: Cleanup Docker Compose
if: always()
Expand Down
14 changes: 14 additions & 0 deletions src/test/kotlin/com/kogo/content/search/AtlasSearchConfigTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,18 @@ class AtlasSearchConfigTest {
assertThat(result.items.first().metadata).isNotEmpty
assertThat(result.items.first().metadata["category"]).isEqualTo("test")
}

@Test
fun `should perform tag-based search`() {
atlasSearchConfig.initializeSearchIndexes()
Thread.sleep(1000)

val result = testSearchIndex.search(
searchText = "important",
paginationRequest = PaginationRequest(limit = 10)
)

assertThat(result.items).hasSize(1)
assertThat(result.items.first().tags).contains("important")
}
}

0 comments on commit 93e63c0

Please sign in to comment.