-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ide starter] Move release filtering to ide starter. Fix for multiple…
… same releases with different build number. Tests on release filtering. GitOrigin-RevId: 2539a455285da2eb268b9bea23fddde7d6c7164a
- Loading branch information
1 parent
ffabd19
commit 6b34dd4
Showing
3 changed files
with
70 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...e.starter.junit5/testSrc/com/intellij/ide/starter/junit5/JetBrainsReleaseFilteringTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.intellij.ide.starter.junit5 | ||
|
||
import com.intellij.ide.starter.community.JetBrainsDataServiceClient | ||
import com.intellij.ide.starter.ide.IdeProductProvider | ||
import io.kotest.matchers.collections.shouldHaveSize | ||
import org.junit.jupiter.api.Test | ||
import kotlin.random.Random | ||
|
||
class JetBrainsReleaseFilteringTest { | ||
@Test | ||
fun `getting N latest public releases`() { | ||
val numberOfReleases = Random.nextInt(2, 10) | ||
val latestReleases = JetBrainsDataServiceClient.getLatestPublicReleases(productType = IdeProductProvider.IU.productCode, | ||
numberOfReleases = numberOfReleases) | ||
latestReleases.shouldHaveSize(numberOfReleases) | ||
latestReleases.map { it.build }.toSet().shouldHaveSize(numberOfReleases) | ||
} | ||
|
||
@Test | ||
fun `filtering only major version of public releases`() { | ||
val numberOfReleases = Random.nextInt(2, 10) | ||
val latestReleases = JetBrainsDataServiceClient.getLatestPublicReleaseVersions(productType = IdeProductProvider.IU.productCode, | ||
numberOfReleases = numberOfReleases) | ||
latestReleases.shouldHaveSize(numberOfReleases) | ||
latestReleases.toSet().shouldHaveSize(numberOfReleases) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters