Skip to content

Commit

Permalink
fix: revert some changes due to GH Windows agents #405
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jan 18, 2023
1 parent 6ed72c2 commit af634ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package au.com.dius.pact.consumer.groovy

import au.com.dius.pact.core.support.SimpleHttp
import groovy.json.JsonSlurper
import spock.lang.IgnoreIf
import spock.lang.Specification

@IgnoreIf({ os.windows }) // Failing on GH action Windows agents
class PactBrokerResultSpec extends Specification {

def 'case when the test passes and the pact is verified'() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ArticlesHttpsTest {
new String[]{"Content-Type", "application/json"});

@Rule
public PactHttpsProviderRule provider = new PactHttpsProviderRule("ArticlesProvider", "localhost", 1234, true, PactSpecVersion.V3, this);
public PactHttpsProviderRule provider = new PactHttpsProviderRule("ArticlesProvider", "localhost", 6631, true, PactSpecVersion.V3, this);

@Pact(provider = "ArticlesProvider", consumer = "ArticlesConsumer")
public RequestResponsePact articlesFragment(PactDslWithProvider builder) {
Expand Down Expand Up @@ -57,6 +57,6 @@ public RequestResponsePact articlesFragment(PactDslWithProvider builder) {
@Test
public void testArticles() throws IOException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
ArticlesRestClient providerRestClient = new ArticlesRestClient();
providerRestClient.getArticles("https://localhost:1234");
providerRestClient.getArticles("https://localhost:6631");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

public class TodoXmlTest {
@Rule
public PactProviderRule provider = new PactProviderRule("TodoProvider", "localhost", 1234, this);
public PactProviderRule provider = new PactProviderRule("TodoProvider", "localhost", 7788, this);

// body: <?xml version="1.0" encoding="UTF-8"?>
// <projects foo="bar">
Expand Down Expand Up @@ -80,7 +80,7 @@ public RequestResponsePact projects(PactDslWithProvider builder) {
@Test
public void testGeneratesAListOfTODOsForTheMainScreen() throws IOException {
Projects projects = new TodoApp()
.setUrl(provider.getMockServer().getUrl())
.setUrl(provider.getConfig().url())
.getProjects("xml");
assertThat(projects.getId(), is("1234"));
assertThat(projects.getProjects(), hasSize(2));
Expand Down

0 comments on commit af634ce

Please sign in to comment.