add tests to check 425 too early behavior

add tests to check 425 too early behavior

add delay postprocessing suite pipeline

add step def
This commit is contained in:
Saw-jan
2023-01-06 11:47:35 +05:45
parent c37d76ffbf
commit 335144e50b
6 changed files with 165 additions and 19 deletions
@@ -1155,4 +1155,34 @@ class AuthContext implements Context {
$this->tokenAuthHasBeenSetTo = '';
}
}
/**
* @When user :user requests :endpoint with :method without retrying
*
* @param string $user
* @param string $endpoint
* @param string $method
*
* @return void
*/
public function userRequestsURLWithoutRetry(
string $user,
string $endpoint,
string $method
):void {
$username = $this->featureContext->getActualUsername($user);
$endpoint = $this->featureContext->substituteInLineCodes(
$endpoint,
$username
);
$fullUrl = $this->featureContext->getBaseUrl() . $endpoint;
$response = HttpRequestHelper::sendRequestOnce(
$fullUrl,
$this->featureContext->getStepLineRef(),
$method,
$username,
$this->featureContext->getPasswordForUser($user)
);
$this->featureContext->setResponse($response);
}
}