Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: removed tests that were testing for files that didnt exist, bumped gradle version to 4.10.2 #93

Merged
merged 2 commits into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2017 SendGrid, Inc.
Copyright (c) 2016-2018 SendGrid, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
4 changes: 1 addition & 3 deletions src/main/java/com/sendgrid/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@ public URI buildUri(String baseUri, String endpoint, Map<String, String> queryPa
*/
public Response getResponse(CloseableHttpResponse response) throws IOException {
ResponseHandler<String> handler = new SendGridResponseHandler();
String responseBody = "";
String responseBody = handler.handleResponse(response);

int statusCode = response.getStatusLine().getStatusCode();

responseBody = handler.handleResponse(response);

Header[] headers = response.getAllHeaders();
Map<String, String> responseHeaders = new HashMap<String, String>();
for (Header h : headers) {
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/sendgrid/SendGridResponseHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ public String handleResponse(final HttpResponse response)
public String handleEntity(HttpEntity entity) throws IOException {
return EntityUtils.toString(entity, StandardCharsets.UTF_8);
}

}
17 changes: 0 additions & 17 deletions src/test/java/com/sendgrid/TestRequiredFilesExist.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ public class TestRequiredFilesExist {
assertTrue(dockerExists);
}

// ./docker-compose.yml or ./docker/docker-compose.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please just comment out these tests for now? Eventually we want them to pass. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, changes are commited 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, should i only re-add the docker-compose ones or USE-CASES.md and .env-sample as well?

@Test public void checkDockerComposeExists() {
boolean dockerComposeExists = new File("./docker-compose.yml").exists() ||
new File("./docker/docker-compose.yml").exists();
assertTrue(dockerComposeExists);
}

// ./.env_sample
@Test public void checkEnvSampleExists() {
assertTrue(new File("./.env_sample").exists());
}

// ./.gitignore
@Test public void checkGitIgnoreExists() {
assertTrue(new File("./.gitignore").exists());
Expand Down Expand Up @@ -84,9 +72,4 @@ public class TestRequiredFilesExist {
@Test public void checkUsageGuideExists() {
assertTrue(new File("./USAGE.md").exists());
}

// ./USE_CASES.md
@Test public void checkUseCases() {
assertTrue(new File("./USE_CASES.md").exists());
}
}