Skip to content

Commit

Permalink
chore: fix test, we are not using a data class anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
kmruiz committed May 23, 2024
1 parent 97cf2f3 commit 0973ffa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/quality-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,12 @@ jobs:
sudo apt install -y docker docker-compose
- name: Run Test Suite
run: |
./gradlew --stacktrace --console=plain "clean" "cleanTest" "unitTest"
./gradlew --stacktrace --console=plain "clean" "cleanTest" "unitTest" "jacocoTestReport" -x "packages:jetbrains-plugin:uiTest"
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Generate Coverage Report
run: |
./gradlew --quiet --console=plain "jacocoTestReport" -x "packages:jetbrains-plugin:uiTest"
- uses: actions/upload-artifact@v4
name: Upload Unit Test Coverage
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package com.mongodb.jbplugin.accessadapter

import org.bson.Document
import org.owasp.encoder.Encode
import java.util.*
import kotlin.reflect.KClass
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
Expand All @@ -23,6 +24,9 @@ import kotlin.time.Duration.Companion.seconds
*/
class Namespace private constructor(val database: String, val collection: String) {
override fun toString(): String = "$database.$collection"
override fun equals(other: Any?): Boolean = other is Namespace && hashCode() == other.hashCode()
override fun hashCode(): Int = Objects.hash(database, collection)

companion object {
operator fun invoke(database: String, collection: String): Namespace = Namespace(
Encode.forJavaScript(database),
Expand Down

0 comments on commit 0973ffa

Please sign in to comment.