-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pankaj Godiyal <[email protected]>
- Loading branch information
1 parent
dec35c7
commit 62f9e4d
Showing
7 changed files
with
163 additions
and
137 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/ResetContextData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.mosip.testrig.dslrig.ivv.e2e.methods; | ||
|
||
import org.apache.log4j.Level; | ||
import org.apache.log4j.Logger; | ||
import org.json.JSONObject; | ||
|
||
import io.mosip.testrig.apirig.kernel.util.ConfigManager; | ||
import io.mosip.testrig.dslrig.ivv.core.base.StepInterface; | ||
import io.mosip.testrig.dslrig.ivv.core.exceptions.RigInternalError; | ||
import io.mosip.testrig.dslrig.ivv.orchestrator.BaseTestCaseUtil; | ||
import io.restassured.response.Response; | ||
|
||
public class ResetContextData extends BaseTestCaseUtil implements StepInterface{ | ||
public static Logger logger = Logger.getLogger(ResetContextData.class); | ||
|
||
static { | ||
if (ConfigManager.IsDebugEnabled()) | ||
logger.setLevel(Level.ALL); | ||
else | ||
logger.setLevel(Level.ERROR); | ||
} | ||
|
||
@Override | ||
public void run() throws RigInternalError { | ||
Response response = null; | ||
|
||
String clearBaseUrlNamespaceData = baseUrl + props.getProperty("resetContextData"); | ||
response = getRequest(clearBaseUrlNamespaceData, "Clear baseUrl namespace data", step); | ||
if (response != null && response.getStatusCode() == 200) { | ||
String responseString = response.getBody().asString(); | ||
if (!responseString.contains("true")) { | ||
logger.info(responseString); | ||
this.hasError = true; | ||
throw new RigInternalError("Clearing baseUrl namespace data from variable manager failed"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.