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

Add test for recovery #409

Merged
merged 11 commits into from
Apr 3, 2018
Merged

Add test for recovery #409

merged 11 commits into from
Apr 3, 2018

Conversation

hossainemruz
Copy link
Contributor

@hossainemruz hossainemruz commented Apr 2, 2018

This PR add some tests for recovery that simulate following steps:

  1. Take backup of workload.
  2. Recover data in another volume.
  3. Mount the recovered volume in workload and re-deploy it.
  4. Check if newly deployed workload has same data as before.

Task to do:

  • Add test for deployment
  • Add test for daemonset
  • Add test for rc
  • Add test for rs
  • Add test for statefulset
  • Update doc for repository

@codecov-io
Copy link

codecov-io commented Apr 2, 2018

Codecov Report

Merging #409 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #409   +/-   ##
=======================================
  Coverage   84.61%   84.61%           
=======================================
  Files           1        1           
  Lines          13       13           
=======================================
  Hits           11       11           
  Misses          1        1           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7dae2e...437422a. Read the comment docs.

@tamalsaha
Copy link
Member

#392

f.EventuallyRepository(api.KindDaemonSet, daemon.ObjectMeta, 1).Should(WithTransform(f.BackupCountInRepositoriesStatus, BeNumerically(">=", 1)))

By("Waiting for backup event")
repos, err := f.StashClient.StashV1alpha1().Repositories(restic.Namespace).List(metav1.ListOptions{})
Copy link
Member

Choose a reason for hiding this comment

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

This is not right.

@hossainemruz
Copy link
Contributor Author

hossainemruz commented Apr 3, 2018

  • Remove repetition of Repository name logic
  • Use repositories of workload's only instead of listing all repository (reason: parallel test problem)
  • Don't use WithTransform() function to extract pod
  • Check recovery for multiple file groups

@tamalsaha tamalsaha merged commit fce51b7 into master Apr 3, 2018
@tamalsaha tamalsaha deleted the recovery-test branch April 3, 2018 15:47
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.

3 participants