Skip to content

Commit b236028

Browse files
committed
correct unit test
1 parent 97106f1 commit b236028

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/io/prometheus/wls/rest/ConfigurationServletTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import javax.servlet.http.HttpServlet;
1313

1414
import io.prometheus.wls.rest.domain.ConfigurationException;
15+
import io.prometheus.wls.rest.domain.Protocol;
1516
import org.apache.http.HttpEntity;
1617
import org.apache.http.entity.ContentType;
1718
import org.apache.http.entity.mime.MultipartEntityBuilder;
@@ -172,15 +173,15 @@ private String asString(HttpEntity entity) throws IOException {
172173
public void afterUploadWithNewRestPort_useItInQueryUrl() throws Exception {
173174
servlet.doPost(createUploadRequest(createEncodedForm("replace", CONFIGURATION_WITH_REST_PORT)), response);
174175

175-
assertThat(LiveConfiguration.getAuthenticationUrl(), containsString(Integer.toString(REST_PORT)));
176+
assertThat(LiveConfiguration.getAuthenticationUrl(Protocol.HTTP), containsString(Integer.toString(REST_PORT)));
176177
}
177178

178179
@Test
179180
public void afterUsingRestPortAndReplaceWithoutIt_queryUrlUsesDefaultPort() throws Exception {
180181
servlet.doPost(createUploadRequest(createEncodedForm("replace", CONFIGURATION_WITH_REST_PORT)), response);
181182
servlet.doPost(createUploadRequest(createEncodedForm("replace", CONFIGURATION)), response);
182183

183-
assertThat(LiveConfiguration.getAuthenticationUrl(), containsString(Integer.toString(HttpServletRequestStub.PORT)));
184+
assertThat(LiveConfiguration.getAuthenticationUrl(Protocol.HTTP), containsString(Integer.toString(HttpServletRequestStub.PORT)));
184185
}
185186

186187
@Test

0 commit comments

Comments
 (0)