Add asserts to silence Sonar warnings re tests
[portal/ric-dashboard.git] / webapp-backend / src / test / java / org / oransc / ric / portal / dashboard / controller / AdminControllerExtension.java
index 6217b08..7783336 100644 (file)
@@ -23,6 +23,7 @@ import java.lang.invoke.MethodHandles;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Profile;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -35,6 +36,7 @@ import org.springframework.web.client.RestClientResponseException;
  * Extends the Admin controller with methods that throw exceptions to support
  * testing.
  */
+@Profile("test")
 @RestController
 @RequestMapping(value = AdminController.CONTROLLER_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
 public class AdminControllerExtension {