Skip to content

Commit

Permalink
Use Gradle Nexus Publish Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 26, 2024
1 parent c76527d commit 4c791fc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions sonatype/src/test/kotlin/com/bakdata/gradle/SonatypePluginIT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.github.tomakehurst.wiremock.WireMockServer
import com.github.tomakehurst.wiremock.client.WireMock.*
import com.github.tomakehurst.wiremock.http.RequestMethod
import com.github.tomakehurst.wiremock.stubbing.Scenario.STARTED
import org.apache.http.protocol.HTTP
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Condition
import org.assertj.core.api.SoftAssertions
Expand Down Expand Up @@ -139,14 +140,10 @@ internal class SonatypePluginIT {
wiremock.stubFor(post(urlMatching("/staging/bulk/close"))
.willReturn(okJson("{}")))
wiremock.stubFor(get(urlMatching("/staging/repository/$STAGING_ID"))
.willReturn(notFound()))
wiremock.stubFor(post(urlMatching("/staging/bulk/promote"))
.inScenario("promoting").whenScenarioStateIs(STARTED)
.willReturn(okJson("{}"))
.willSetStateTo("promoting"))
wiremock.stubFor(get(urlMatching("/staging/repository/$STAGING_ID"))
.inScenario("promoting").whenScenarioStateIs("promoting")
.willReturn(okJson("""{"type": "released", "transitioning": false}""")))
.willReturn(aResponse()
.withStatus(404)
.withHeader(HTTP.CONTENT_TYPE, "application/json")
.withBody("""{"repositoryId": "$STAGING_ID", "type": "closed", "transitioning": false}""")))
}

@Disabled
Expand Down

0 comments on commit 4c791fc

Please sign in to comment.