---
# System prepended metadata

title: Untitled

---

#### GCAT-4 GDPR UAT Test

Personal users - retentionDate will be updated
  - create trial
  - webhook from cb
  
Domain users
  - retentionDate store at domain-subscriptions table
  - grab domain users from that domain. [kangleng.ong@servicerocket.com,abudllah.a@servicerocket.com]
  - loop through the users and invoke removeData function.
    - removeData(kangleng.ong, servicerocket.com)
    - removeData(abdullah.a, servicerocket.com)


#### Personal Subscription GDPR Test
1. Subscribe a personal plan in chargebee. 
    - Plan updated in dynamodb in subscription table :ok:
    - account table is updated with the retentionDate, 30 days after plan expired. :ok: 
    - create some events,, attendance data and etc :heavy_minus_sign:
2. Run gdpr scheduler checker
    - the account and all data still there :ok:
3. Update the retentionDate to today date, populate some data using script, and rerun gdpr scheduler checker
    - the account and data is all removed from database :ok:
    - the subscription and customer is removed in  chargebee (for trial plan) :ok:
    - for monthly/yearly subsricption, the subscription is removed in dynamodb only but customer & subscriptions still maintain in chargebee :ok:


#### Domain Subscription GDPR Test
##### Test Data
1. abdullah.a@servicerocket.com (holding personal subscription plan)
2. kangleng.ong@servicerocket.com (not holding any plan)

Both accounts must have some events and data.

#### Scenario
1. Subscribe a domain subscription for servicerocket.com
   - Plan updated in dynamodb in domain subscription table 
     with retentionDate is 30 days after. :ok:
3. Invite the above emails to domain users
    - make sure all data is flagged with servicerocket.com :ok:
    - verify the accounts table, abdullah account retentionDate is changed from previous date to none :ok:
4. Run GDPR scheduler checker, all data should still there
5. Update servicerocket.com subscription in domain-subscriptions table where retentionDate is today
6. Rerun the GDPR scheduler checker
    - verify all data for kangleng.ong is deleted :ok:
    - verify all data for abdullah.a is retained :ok:
    - verify abdullah.a account in accounts table retentionDate is updated according to his subscription endDate :ok:

#### Domain import users
1. Adding new user to the domain for existing account
    - accounts table should remove retentionDate for existing account :ok: 
2. Removing a user from domain-users
    - accounts table should set retentionDate for existing account
      
      if account own an subscription, retentionDate should set to the date 30 days after the subscription end date :ok: 
      
      if account didnt not have any subscription, retentionDate should set to today date + 1 month :ok: 
      