Because saving and loading specified vdi in cluster wide snapshot was introduced, TC 030 is updated for new test cases.
Signed-off-by: Ruoyu <lian...@ucweb.com> --- tests/functional/030 | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/functional/030.out | 49 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) diff --git a/tests/functional/030 b/tests/functional/030 index 463b911..90800b5 100755 --- a/tests/functional/030 +++ b/tests/functional/030 @@ -87,3 +87,56 @@ diff -u $STORE/csum.21.org $STORE/csum.21.new $DOG cluster info -v | _filter_cluster_info _vdi_create test3 10M _vdi_list + + +# save or load specified vdi + +_cleanup +for i in `seq 0 5`; do + _start_sheep $i +done +_wait_for_sheep 6 + +_cluster_format + +for i in `seq 0 9`; do + $DOG vdi create test$i 10M + _random | $DOG vdi write test$i + $DOG vdi read test$i | md5sum > $STORE/csum.${i}3.org + $DOG vdi snapshot test$i -s snap +done +_vdi_list + +$DOG cluster snapshot save s3 $TMPDIR test0 test2 test4 test6 test8 + +$DOG cluster snapshot show s3 $TMPDIR + +_cleanup +for i in `seq 0 5`; do + _start_sheep $i +done +_wait_for_sheep 6 + +_cluster_format +$DOG cluster snapshot load s3 $TMPDIR +_vdi_list + +for i in 0 2 4 6 8; do + $DOG vdi read test$i | md5sum > $STORE/csum.${i}3.new + diff -u $STORE/csum.${i}3.org $STORE/csum.${i}3.new +done + +_cleanup +for i in `seq 0 5`; do + _start_sheep $i +done +_wait_for_sheep 6 + +_cluster_format +$DOG cluster snapshot load s3 $TMPDIR test0 test4 test8 +_vdi_list + +for i in 0 4 8; do + $DOG vdi read test$i | md5sum > $STORE/csum.${i}3.new + diff -u $STORE/csum.${i}3.org $STORE/csum.${i}3.new +done diff --git a/tests/functional/030.out b/tests/functional/030.out index 6811919..e54237e 100644 --- a/tests/functional/030.out +++ b/tests/functional/030.out @@ -50,3 +50,52 @@ s test1 2 10 MB 12 MB 0.0 MB DATE fd32fd 6 s test2 1 10 MB 12 MB 0.0 MB DATE fd3815 3 s test2 2 10 MB 12 MB 0.0 MB DATE fd3816 3 test2 0 10 MB 0.0 MB 12 MB DATE fd3817 3 +using backend plain store + Name Id Size Used Shared Creation time VDI id Copies Tag +s test5 1 10 MB 12 MB 0.0 MB DATE fd2c30 3 snap + test5 0 10 MB 0.0 MB 12 MB DATE fd2c31 3 +s test4 1 10 MB 12 MB 0.0 MB DATE fd2de3 3 snap + test4 0 10 MB 0.0 MB 12 MB DATE fd2de4 3 +s test7 1 10 MB 12 MB 0.0 MB DATE fd2f96 3 snap + test7 0 10 MB 0.0 MB 12 MB DATE fd2f97 3 +s test6 1 10 MB 12 MB 0.0 MB DATE fd3149 3 snap + test6 0 10 MB 0.0 MB 12 MB DATE fd314a 3 +s test1 1 10 MB 12 MB 0.0 MB DATE fd32fc 3 snap + test1 0 10 MB 0.0 MB 12 MB DATE fd32fd 3 +s test0 1 10 MB 12 MB 0.0 MB DATE fd34af 3 snap + test0 0 10 MB 0.0 MB 12 MB DATE fd34b0 3 +s test3 1 10 MB 12 MB 0.0 MB DATE fd3662 3 snap + test3 0 10 MB 0.0 MB 12 MB DATE fd3663 3 +s test2 1 10 MB 12 MB 0.0 MB DATE fd3815 3 snap + test2 0 10 MB 0.0 MB 12 MB DATE fd3816 3 +s test9 1 10 MB 12 MB 0.0 MB DATE fd4094 3 snap + test9 0 10 MB 0.0 MB 12 MB DATE fd4095 3 +s test8 1 10 MB 12 MB 0.0 MB DATE fd4247 3 snap + test8 0 10 MB 0.0 MB 12 MB DATE fd4248 3 +1. VDI id: fd2de3, name: test4, tag: snap +2. VDI id: fd3149, name: test6, tag: snap +3. VDI id: fd34af, name: test0, tag: snap +4. VDI id: fd3815, name: test2, tag: snap +5. VDI id: fd4247, name: test8, tag: snap +using backend plain store +using backend plain store + Name Id Size Used Shared Creation time VDI id Copies Tag +s test4 1 10 MB 12 MB 0.0 MB DATE fd2de3 3 snap + test4 0 10 MB 0.0 MB 12 MB DATE fd2de4 3 +s test6 1 10 MB 12 MB 0.0 MB DATE fd3149 3 snap + test6 0 10 MB 0.0 MB 12 MB DATE fd314a 3 +s test0 1 10 MB 12 MB 0.0 MB DATE fd34af 3 snap + test0 0 10 MB 0.0 MB 12 MB DATE fd34b0 3 +s test2 1 10 MB 12 MB 0.0 MB DATE fd3815 3 snap + test2 0 10 MB 0.0 MB 12 MB DATE fd3816 3 +s test8 1 10 MB 12 MB 0.0 MB DATE fd4247 3 snap + test8 0 10 MB 0.0 MB 12 MB DATE fd4248 3 +using backend plain store +using backend plain store + Name Id Size Used Shared Creation time VDI id Copies Tag +s test4 1 10 MB 12 MB 0.0 MB DATE fd2de3 3 snap + test4 0 10 MB 0.0 MB 12 MB DATE fd2de4 3 +s test0 1 10 MB 12 MB 0.0 MB DATE fd34af 3 snap + test0 0 10 MB 0.0 MB 12 MB DATE fd34b0 3 +s test8 1 10 MB 12 MB 0.0 MB DATE fd4247 3 snap + test8 0 10 MB 0.0 MB 12 MB DATE fd4248 3 -- 1.8.3.2 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog