|
12 | 12 | } |
13 | 13 |
|
14 | 14 | @test 'Exit with error when no arguments are supplied' { |
15 | | - run archive_vms.zsh |
| 15 | + run archive_fusionvm |
16 | 16 |
|
17 | 17 | assert $state equals 3 |
18 | 18 | } |
19 | 19 |
|
20 | 20 | @test 'Exit with error when no second argument is supplied' { |
21 | | - run archive_vms.zsh $TEMP/decoy_dir |
| 21 | + run archive_fusionvm $TEMP/decoy_dir |
22 | 22 |
|
23 | 23 | assert $state equals 3 |
24 | 24 | } |
25 | 25 |
|
26 | 26 | @test 'Exit with error when first argument path does not exist' { |
27 | | - run archive_vms.zsh /zxcvbn/foo/bar/baz/bluth $TEMP/out.dmg |
| 27 | + run archive_fusionvm /zxcvbn/foo/bar/baz/bluth $TEMP/out.dmg |
28 | 28 |
|
29 | 29 | assert $state equals 3 |
30 | 30 | } |
31 | 31 |
|
32 | 32 | @test 'First argument relative path is expanded to absolute path' { |
33 | 33 | # $RELTEMP is also set up in bootstrap |
34 | | - run archive_vms.zsh $RELTEMP/decoy_dir $TEMP/out.dmg |
| 34 | + run archive_fusionvm $RELTEMP/decoy_dir $TEMP/out.dmg |
35 | 35 |
|
36 | 36 | # Filter run output to line that begins with SRCPATH. |
37 | 37 | srcpath=(${(M)lines:#SRCPATH*}) |
|
40 | 40 | } |
41 | 41 |
|
42 | 42 | @test 'Exit with error when first argument path is a file' { |
43 | | - run archive_vms.zsh $TEMP/decoy_file $TEMP/out.dmg |
| 43 | + run archive_fusionvm $TEMP/decoy_file $TEMP/out.dmg |
44 | 44 |
|
45 | 45 | assert $state equals 3 |
46 | 46 | } |
|
57 | 57 | $bogusvm |
58 | 58 | EOF |
59 | 59 |
|
60 | | - run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg |
| 60 | + run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg |
61 | 61 |
|
62 | 62 | # Suspend calls are logged to file; read as array. |
63 | 63 | suspendout=(${(@f)"$(<$TEMP/vmrun_suspend.calls)"}) |
|
71 | 71 | cat > $TEMP/vmrun_list_1 <<-EOF |
72 | 72 | EOF |
73 | 73 |
|
74 | | - run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg |
| 74 | + run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg |
75 | 75 |
|
76 | 76 | if [ -f $TEMP/vmrun_suspend.calls ]; then |
77 | 77 | fail 'vmrun suspend was called' |
|
88 | 88 | $TEMP/decoy_dir/examplevm.vmx |
89 | 89 | EOF |
90 | 90 |
|
91 | | - run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg |
| 91 | + run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg |
92 | 92 |
|
93 | 93 | suspendcalls=(${(@f)"$(<$TEMP/vmrun_suspend.calls)"}) |
94 | 94 |
|
|
104 | 104 | $TEMP/decoy_dir/examplevm.vmx |
105 | 105 | EOF |
106 | 106 |
|
107 | | - run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg |
| 107 | + run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg |
108 | 108 |
|
109 | 109 | assert $state equals 4 |
110 | 110 | if [ -f $TEMP/hdiutil.calls ]; then |
|
115 | 115 | } |
116 | 116 |
|
117 | 117 | @test 'hdiutil create is executed' { |
118 | | - run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg |
| 118 | + run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg |
119 | 119 |
|
120 | 120 | assert "$TEMP/hdiutil.calls" exists |
121 | 121 | } |
|
124 | 124 | arg1=$TEMP/decoy_dir |
125 | 125 | arg2=$TEMP/out.dmg |
126 | 126 |
|
127 | | - run archive_vms.zsh $arg1 $arg2 |
| 127 | + run archive_fusionvm $arg1 $arg2 |
128 | 128 |
|
129 | 129 | # hdiutil mock outputs calls to file; read args as array |
130 | 130 | hdiutilout=(${(@f)"$(<$TEMP/hdiutil.calls)"}) |
|
0 commit comments