Add integration test for license release

Bug: 258816489
Change-Id: I315eefeb479146de2563aefa75303633341d86f0
This commit is contained in:
Vicky Min
2023-09-19 21:41:21 +00:00
committed by Robert Shih
parent df6d73f021
commit 159aeeecf4
3 changed files with 100 additions and 11 deletions

View File

@@ -72,6 +72,12 @@ class LicenseHolder {
void FetchRenewal();
// Load the renewal response that was fetched in FetchRenewal().
void LoadRenewal();
// Generate the release request, and send it to the server.
void GenerateAndPostReleaseRequest(const std::string& policy_id);
// Fetch the release response. This can add a few seconds of latency.
void FetchRelease();
// Load the release response that was fetched in FetchRelease().
void LoadRelease();
// Releases the license and frees up entry in usage table.
void RemoveLicense();
@@ -115,9 +121,9 @@ class LicenseHolder {
CdmEngine* cdm_engine_ = nullptr;
const ConfigTestEnv& config_;
SimpleEventListener event_listener_;
std::unique_ptr<UrlRequest> renewal_in_flight_;
std::string renewal_message_;
std::string renewal_response_;
std::unique_ptr<UrlRequest> request_in_flight_;
std::string request_message_;
std::string request_response_;
// Generate the license request.
void GenerateKeyRequest(const InitializationData& init_data,