Commit 0311d439 authored by Ramu Dosapati's avatar Ramu Dosapati

Test code successful

parent bb468e00
Pipeline #2924 failed with stage
in 0 seconds
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/pricing-pod-poc.main.iml" filepath="$PROJECT_DIR$/.idea/modules/pricing-pod-poc.main.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../../build/generated/sources/annotationProcessor/java/main">
<sourceFolder url="file://$MODULE_DIR$/../../build/generated/sources/annotationProcessor/java/main" isTestSource="false" generated="true" />
</content>
</component>
</module>
\ No newline at end of file
...@@ -5,12 +5,7 @@ ...@@ -5,12 +5,7 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="7b9430d6-468c-4ecd-adf2-7064b78ab3d1" name="Changes" comment=""> <list default="true" id="7b9430d6-468c-4ecd-adf2-7064b78ab3d1" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/src/test/java/com/safeway/pricing/safeway/SafewayPricingPodApplicationTests.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/test/java/com/safeway/pricing/safeway/router/RoutesTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/gradle.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/gradle.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -66,6 +61,36 @@ ...@@ -66,6 +61,36 @@
<recent name="D:\safeway\pricing-pod-j\pricing-pod-poc\src" /> <recent name="D:\safeway\pricing-pod-j\pricing-pod-poc\src" />
</key> </key>
</component> </component>
<component name="RunManager">
<configuration name="SafewayPricingPodApplicationTests" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":test" />
<option value="--tests" />
<option value="&quot;com.safeway.pricing.safeway.SafewayPricingPodApplicationTests&quot;" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Gradle.SafewayPricingPodApplicationTests" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager"> <component name="TaskManager">
<task active="true" id="Default" summary="Default task"> <task active="true" id="Default" summary="Default task">
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
<tr> <tr>
<td> <td>
<div class="infoBox" id="tests"> <div class="infoBox" id="tests">
<div class="counter">3</div> <div class="counter">1</div>
<p>tests</p> <p>tests</p>
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox" id="failures"> <div class="infoBox" id="failures">
<div class="counter">1</div> <div class="counter">0</div>
<p>failures</p> <p>failures</p>
</div> </div>
</td> </td>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</td> </td>
<td> <td>
<div class="infoBox" id="duration"> <div class="infoBox" id="duration">
<div class="counter">10.566s</div> <div class="counter">10.552s</div>
<p>duration</p> <p>duration</p>
</div> </div>
</td> </td>
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox failures" id="successRate"> <div class="infoBox success" id="successRate">
<div class="percent">66%</div> <div class="percent">100%</div>
<p>successful</p> <p>successful</p>
</div> </div>
</td> </td>
...@@ -58,25 +58,13 @@ ...@@ -58,25 +58,13 @@
<div id="tabs"> <div id="tabs">
<ul class="tabLinks"> <ul class="tabLinks">
<li> <li>
<a href="#tab0">Failed tests</a> <a href="#tab0">Packages</a>
</li> </li>
<li> <li>
<a href="#tab1">Packages</a> <a href="#tab1">Classes</a>
</li>
<li>
<a href="#tab2">Classes</a>
</li> </li>
</ul> </ul>
<div id="tab0" class="tab"> <div id="tab0" class="tab">
<h2>Failed tests</h2>
<ul class="linkList">
<li>
<a href="classes/com.safeway.pricing.safeway.SafewayPricingPodApplicationTests.html">SafewayPricingPodApplicationTests</a>.
<a href="classes/com.safeway.pricing.safeway.SafewayPricingPodApplicationTests.html#expectOKResponse_WhenAccessNotSecuredURL()">expectOKResponse_WhenAccessNotSecuredURL()</a>
</li>
</ul>
</div>
<div id="tab1" class="tab">
<h2>Packages</h2> <h2>Packages</h2>
<table> <table>
<thead> <thead>
...@@ -91,19 +79,19 @@ ...@@ -91,19 +79,19 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class="failures"> <td class="success">
<a href="packages/com.safeway.pricing.safeway.html">com.safeway.pricing.safeway</a> <a href="packages/com.safeway.pricing.safeway.html">com.safeway.pricing.safeway</a>
</td> </td>
<td>3</td>
<td>1</td> <td>1</td>
<td>0</td> <td>0</td>
<td>10.566s</td> <td>0</td>
<td class="failures">66%</td> <td>10.552s</td>
<td class="success">100%</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div id="tab2" class="tab"> <div id="tab1" class="tab">
<h2>Classes</h2> <h2>Classes</h2>
<table> <table>
<thead> <thead>
...@@ -118,14 +106,14 @@ ...@@ -118,14 +106,14 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class="failures"> <td class="success">
<a href="classes/com.safeway.pricing.safeway.SafewayPricingPodApplicationTests.html">com.safeway.pricing.safeway.SafewayPricingPodApplicationTests</a> <a href="classes/com.safeway.pricing.safeway.SafewayPricingPodApplicationTests.html">com.safeway.pricing.safeway.SafewayPricingPodApplicationTests</a>
</td> </td>
<td>3</td>
<td>1</td> <td>1</td>
<td>0</td> <td>0</td>
<td>10.566s</td> <td>0</td>
<td class="failures">66%</td> <td>10.552s</td>
<td class="success">100%</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -138,7 +126,7 @@ ...@@ -138,7 +126,7 @@
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label> </label>
</div>Generated by </div>Generated by
<a href="http://www.gradle.org">Gradle 7.4</a> at Dec 12, 2022, 4:13:29 PM</p> <a href="http://www.gradle.org">Gradle 7.4</a> at Dec 12, 2022, 6:51:42 PM</p>
</div> </div>
</div> </div>
</body> </body>
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
<tr> <tr>
<td> <td>
<div class="infoBox" id="tests"> <div class="infoBox" id="tests">
<div class="counter">3</div> <div class="counter">1</div>
<p>tests</p> <p>tests</p>
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox" id="failures"> <div class="infoBox" id="failures">
<div class="counter">1</div> <div class="counter">0</div>
<p>failures</p> <p>failures</p>
</div> </div>
</td> </td>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</td> </td>
<td> <td>
<div class="infoBox" id="duration"> <div class="infoBox" id="duration">
<div class="counter">10.566s</div> <div class="counter">10.552s</div>
<p>duration</p> <p>duration</p>
</div> </div>
</td> </td>
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
</div> </div>
</td> </td>
<td> <td>
<div class="infoBox failures" id="successRate"> <div class="infoBox success" id="successRate">
<div class="percent">66%</div> <div class="percent">100%</div>
<p>successful</p> <p>successful</p>
</div> </div>
</td> </td>
...@@ -60,22 +60,10 @@ ...@@ -60,22 +60,10 @@
<div id="tabs"> <div id="tabs">
<ul class="tabLinks"> <ul class="tabLinks">
<li> <li>
<a href="#tab0">Failed tests</a> <a href="#tab0">Classes</a>
</li>
<li>
<a href="#tab1">Classes</a>
</li> </li>
</ul> </ul>
<div id="tab0" class="tab"> <div id="tab0" class="tab">
<h2>Failed tests</h2>
<ul class="linkList">
<li>
<a href="../classes/com.safeway.pricing.safeway.SafewayPricingPodApplicationTests.html">SafewayPricingPodApplicationTests</a>.
<a href="../classes/com.safeway.pricing.safeway.SafewayPricingPodApplicationTests.html#expectOKResponse_WhenAccessNotSecuredURL()">expectOKResponse_WhenAccessNotSecuredURL()</a>
</li>
</ul>
</div>
<div id="tab1" class="tab">
<h2>Classes</h2> <h2>Classes</h2>
<table> <table>
<thread> <thread>
...@@ -89,14 +77,14 @@ ...@@ -89,14 +77,14 @@
</tr> </tr>
</thread> </thread>
<tr> <tr>
<td class="failures"> <td class="success">
<a href="../classes/com.safeway.pricing.safeway.SafewayPricingPodApplicationTests.html">SafewayPricingPodApplicationTests</a> <a href="../classes/com.safeway.pricing.safeway.SafewayPricingPodApplicationTests.html">SafewayPricingPodApplicationTests</a>
</td> </td>
<td>3</td>
<td>1</td> <td>1</td>
<td>0</td> <td>0</td>
<td>10.566s</td> <td>0</td>
<td class="failures">66%</td> <td>10.552s</td>
<td class="success">100%</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -108,7 +96,7 @@ ...@@ -108,7 +96,7 @@
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label> </label>
</div>Generated by </div>Generated by
<a href="http://www.gradle.org">Gradle 7.4</a> at Dec 12, 2022, 4:13:29 PM</p> <a href="http://www.gradle.org">Gradle 7.4</a> at Dec 12, 2022, 6:51:42 PM</p>
</div> </div>
</div> </div>
</body> </body>
......
...@@ -60,3 +60,38 @@ data:{"departments":["314-Dairy"],"category":["3610-Traditional"],"groups":["36- ...@@ -60,3 +60,38 @@ data:{"departments":["314-Dairy"],"category":["3610-Traditional"],"groups":["36-
2022-12-12 18:45:48.737 INFO 24392 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Starting SafewayPricingPodApplicationTests using Java 11.0.2 on HYD-LAP-00823 with PID 24392 (started by rdosapati in D:\safeway\pricing-pod-j\pricing-pod-poc)
2022-12-12 18:45:48.749 INFO 24392 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : No active profile set, falling back to default profiles: default
2022-12-12 18:45:49.434 INFO 24392 --- [Test worker] ctiveUserDetailsServiceAutoConfiguration :
Using generated security password: fc067800-b8de-4f80-a8c7-64c57a3aee9e
2022-12-12 18:45:50.202 INFO 24392 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Started SafewayPricingPodApplicationTests in 1.885 seconds (JVM running for 3.755)
2022-12-12 18:46:54.724 INFO 7936 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Starting SafewayPricingPodApplicationTests using Java 11.0.2 on HYD-LAP-00823 with PID 7936 (started by rdosapati in D:\safeway\pricing-pod-j\pricing-pod-poc)
2022-12-12 18:46:54.725 INFO 7936 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : No active profile set, falling back to default profiles: default
2022-12-12 18:46:55.374 INFO 7936 --- [Test worker] ctiveUserDetailsServiceAutoConfiguration :
Using generated security password: 2d4f6da1-307c-4b49-b84c-fa34ab33b236
2022-12-12 18:46:55.988 INFO 7936 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Started SafewayPricingPodApplicationTests in 1.673 seconds (JVM running for 3.504)
2022-12-12 18:48:31.228 INFO 13156 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Starting SafewayPricingPodApplicationTests using Java 11.0.2 on HYD-LAP-00823 with PID 13156 (started by rdosapati in D:\safeway\pricing-pod-j\pricing-pod-poc)
2022-12-12 18:48:31.229 INFO 13156 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : No active profile set, falling back to default profiles: default
2022-12-12 18:48:31.809 INFO 13156 --- [Test worker] ctiveUserDetailsServiceAutoConfiguration :
Using generated security password: 30d49d9b-e92d-4812-b52e-5be192180c9c
2022-12-12 18:48:32.387 INFO 13156 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Started SafewayPricingPodApplicationTests in 1.646 seconds (JVM running for 3.834)
2022-12-12 18:50:07.408 INFO 28052 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Starting SafewayPricingPodApplicationTests using Java 11.0.2 on HYD-LAP-00823 with PID 28052 (started by rdosapati in D:\safeway\pricing-pod-j\pricing-pod-poc)
2022-12-12 18:50:07.409 INFO 28052 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : No active profile set, falling back to default profiles: default
2022-12-12 18:50:08.062 INFO 28052 --- [Test worker] ctiveUserDetailsServiceAutoConfiguration :
Using generated security password: e7d4cf46-d94b-4a72-9bb2-5c42982f4780
2022-12-12 18:50:08.577 INFO 28052 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Started SafewayPricingPodApplicationTests in 1.608 seconds (JVM running for 3.42)
2022-12-12 18:51:31.067 INFO 7388 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Starting SafewayPricingPodApplicationTests using Java 11.0.2 on HYD-LAP-00823 with PID 7388 (started by rdosapati in D:\safeway\pricing-pod-j\pricing-pod-poc)
2022-12-12 18:51:31.069 INFO 7388 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : No active profile set, falling back to default profiles: default
2022-12-12 18:51:31.709 INFO 7388 --- [Test worker] ctiveUserDetailsServiceAutoConfiguration :
Using generated security password: 3133dfa7-ad3d-4de6-ab05-8b42d94d5861
2022-12-12 18:51:32.239 INFO 7388 --- [Test worker] .s.p.s.SafewayPricingPodApplicationTests : Started SafewayPricingPodApplicationTests in 1.564 seconds (JVM running for 3.398)
...@@ -14,8 +14,10 @@ import org.springframework.test.context.ContextConfiguration; ...@@ -14,8 +14,10 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.test.web.reactive.server.WebTestClient;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
import reactor.test.StepVerifier;
import java.time.Duration; import java.time.Duration;
import java.util.Arrays;
@ExtendWith(SpringExtension.class) @ExtendWith(SpringExtension.class)
@ContextConfiguration(classes={AppRouterConfig.class, PricingHandler.class,SecurityConfig.class}) @ContextConfiguration(classes={AppRouterConfig.class, PricingHandler.class,SecurityConfig.class})
...@@ -39,16 +41,22 @@ class SafewayPricingPodApplicationTests { ...@@ -39,16 +41,22 @@ class SafewayPricingPodApplicationTests {
@Test @Test
void expectOKResponse_WhenAccessNotSecuredURL() throws Exception { void expectOKResponse_WhenAccessNotSecuredURL() throws Exception {
webTestClient.get().uri("/getDefaultFilterDetails") FilterByDetails filterByDetails=FilterByDetails.builder()
.category(Arrays.asList("3610-Traditional")).departments(Arrays.asList("314-Dairy"))
.groups(Arrays.asList("36-Refrigirator Dairy"))
.rog(Arrays.asList("VSOC"))
.priceAreas(Arrays.asList("VSOC-01"))
.storeGroups(Arrays.asList("51")).build();
Flux<FilterByDetails> flux=webTestClient.get().uri("/getDefaultFilterDetails")
.accept(MediaType.TEXT_EVENT_STREAM) .accept(MediaType.TEXT_EVENT_STREAM)
.exchange() .exchange()
.expectStatus() .expectStatus()
.is3xxRedirection() .isOk()
.expectBody(FilterByDetails.class) .returnResult(FilterByDetails.class).getResponseBody();
.value(System.out::println);
// StepVerifier.create(flux).expectNext(filterByDetails1,filterByDetails1,filterByDetails1,filterByDetails1,filterByDetails1 StepVerifier.create(flux).expectNextCount(10).verifyComplete();
// ,filterByDetails1,filterByDetails1,filterByDetails1,filterByDetails1,filterByDetails1).verifyComplete();
} }
@Test @Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment