[tests-only]Added GDPR export. check events when user is created (#6106)

* Added GDPR export for event upload file

* Add for user created events for GDPR export

* Add for user information assertion

* Review Address
This commit is contained in:
Sagar Gurung
2023-04-27 16:04:17 +05:45
committed by GitHub
parent b7990875c1
commit 579dcd082a
4 changed files with 306 additions and 0 deletions
+33
View File
@@ -1360,4 +1360,37 @@ class GraphHelper {
self::getRequestHeaders()
);
}
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $userId
* @param string $path
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function generateGDPRReport(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $userId,
string $path
): ResponseInterface {
$url = self::getFullUrl($baseUrl, 'users/' . $userId . '/exportPersonalData');
// this payload is the storage location of the report generated
$payload['storageLocation'] = $path;
return HttpRequestHelper::sendRequest(
$url,
$xRequestId,
"POST",
$user,
$password,
self::getRequestHeaders(),
\json_encode($payload)
);
}
}