Skip to content

Commit

Permalink
clean up (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
chanseokoh authored Feb 27, 2019
1 parent f36a57c commit b0174eb
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@

package com.google.cloud.tools.jib.http;

import java.io.ByteArrayOutputStream;
import com.google.cloud.tools.jib.blob.Blobs;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;
import javax.net.ssl.SSLException;
import org.junit.Assert;
Expand All @@ -38,10 +37,7 @@ public void testGet()
Response response = connection.send("GET", new Request.Builder().build());

Assert.assertEquals(200, response.getStatusCode());

ByteArrayOutputStream out = new ByteArrayOutputStream();
response.getBody().writeTo(out);
Assert.assertEquals("Hello World!", new String(out.toByteArray(), StandardCharsets.UTF_8));
Assert.assertEquals("Hello World!", Blobs.writeToString(response.getBody()));
}
}

Expand Down Expand Up @@ -85,10 +81,7 @@ public void testInsecureConnection()
Response response = connection.send("GET", new Request.Builder().build());

Assert.assertEquals(200, response.getStatusCode());

ByteArrayOutputStream out = new ByteArrayOutputStream();
response.getBody().writeTo(out);
Assert.assertEquals("Hello World!", new String(out.toByteArray(), StandardCharsets.UTF_8));
Assert.assertEquals("Hello World!", Blobs.writeToString(response.getBody()));
}
}
}

0 comments on commit b0174eb

Please sign in to comment.