Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(restore): add mock test for restore endpoint #114

Merged

Conversation

mittachaitu
Copy link
Contributor

@mittachaitu mittachaitu commented Jul 1, 2020

Signed-off-by: mittachaitu sai.chaithanya@mayadata.io
This PR adds a mock test(unit test) for Restore endpoint.

List of unit test
Backup endpoint

  • Trigger delete method on the backup endpoint(It should delete snapshot, CStorBackup, and CStorCompletedBackup CR's).
  • Trigger delete method on the backup endpoint by injecting errors in snapshot deletion(should return an error).
  • Trigger delete method on the backup endpoint when the backup is for scheduled backup(It should not delete CStorCompletedBackup).
  • Trigger delete method on the backup endpoint without the required information(should return an error).

Restore endpoint

  • Trigger POST method for remote restore on the restore endpoint(It should create required resources for restore).
  • Trigger POST method for remote restore on the restore endpoint by disabling the CVC reconciliation(should return an error).
  • Trigger POST method for local restore on the restore endpoint(positive and error injection are covered).

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
@mittachaitu mittachaitu self-assigned this Jul 1, 2020
Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments otherwise looks good

…uring creation of resource

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@prateekpandey14 prateekpandey14 merged commit 74b6a3a into openebs-archive:master Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants