Skip to content

Commit

Permalink
Merge pull request #404 from RWS/subtask/UDP-11072
Browse files Browse the repository at this point in the history
UDP-11072 re-enable test
  • Loading branch information
mchireychik authored Aug 5, 2024
2 parents e655203 + 8993040 commit 7869644
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.sdl.odata.client.api.exception.ODataClientRuntimeException;
import com.sdl.odata.client.api.exception.ODataClientTimeout;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Value;
Expand Down Expand Up @@ -57,7 +56,6 @@
@ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = TestConfiguration.class)
@DirtiesContext
@Disabled
public class BasicEndpointCallerTest {

private static final String RESPONSE = "/response.xml";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@
*/
package com.sdl.odata.client.caller;

import java.io.IOException;
import java.io.InputStream;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.IOException;
import java.io.InputStream;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.springframework.util.StreamUtils.copyToString;

/**
* MockController.
*/
@Component
@RequestMapping("/")
@Controller
class MockController {

private static final String RESPONSE = "response.xml";

@RequestMapping(value = "{code:\\d{3}}")
ResponseEntity<?> respondWithCode(@PathVariable int code) throws IOException {
ResponseEntity<?> respondWithCode(@PathVariable("code") int code) throws IOException {
return ResponseEntity.status(HttpStatus.valueOf(code)).body(String.valueOf(code));
}

Expand Down

0 comments on commit 7869644

Please sign in to comment.