vagrant-conoha 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.rubocop.yml +35 -0
  4. data/CHANGELOG.md +3 -0
  5. data/Gemfile +19 -0
  6. data/LICENSE +23 -0
  7. data/Rakefile +25 -0
  8. data/Vagrantfile +71 -0
  9. data/dummy.box +0 -0
  10. data/example_box/README.md +13 -0
  11. data/example_box/metadata.json +3 -0
  12. data/functional_tests/Vagrantfile +58 -0
  13. data/functional_tests/keys/vagrant-openstack +27 -0
  14. data/functional_tests/keys/vagrant-openstack.pub +1 -0
  15. data/functional_tests/run_tests.sh +142 -0
  16. data/lib/vagrant-conoha.rb +29 -0
  17. data/lib/vagrant-conoha/action.rb +227 -0
  18. data/lib/vagrant-conoha/action/abstract_action.rb +22 -0
  19. data/lib/vagrant-conoha/action/connect_openstack.rb +60 -0
  20. data/lib/vagrant-conoha/action/create_server.rb +154 -0
  21. data/lib/vagrant-conoha/action/create_stack.rb +68 -0
  22. data/lib/vagrant-conoha/action/delete_server.rb +53 -0
  23. data/lib/vagrant-conoha/action/delete_stack.rb +73 -0
  24. data/lib/vagrant-conoha/action/message.rb +19 -0
  25. data/lib/vagrant-conoha/action/provision.rb +60 -0
  26. data/lib/vagrant-conoha/action/read_ssh_info.rb +72 -0
  27. data/lib/vagrant-conoha/action/read_state.rb +43 -0
  28. data/lib/vagrant-conoha/action/resume.rb +24 -0
  29. data/lib/vagrant-conoha/action/start_server.rb +24 -0
  30. data/lib/vagrant-conoha/action/stop_server.rb +25 -0
  31. data/lib/vagrant-conoha/action/suspend.rb +24 -0
  32. data/lib/vagrant-conoha/action/sync_folders.rb +129 -0
  33. data/lib/vagrant-conoha/action/wait_accessible.rb +61 -0
  34. data/lib/vagrant-conoha/action/wait_active.rb +33 -0
  35. data/lib/vagrant-conoha/action/wait_stop.rb +33 -0
  36. data/lib/vagrant-conoha/catalog/openstack_catalog.rb +67 -0
  37. data/lib/vagrant-conoha/client/cinder.rb +39 -0
  38. data/lib/vagrant-conoha/client/domain.rb +159 -0
  39. data/lib/vagrant-conoha/client/glance.rb +65 -0
  40. data/lib/vagrant-conoha/client/heat.rb +49 -0
  41. data/lib/vagrant-conoha/client/http_utils.rb +116 -0
  42. data/lib/vagrant-conoha/client/keystone.rb +77 -0
  43. data/lib/vagrant-conoha/client/neutron.rb +48 -0
  44. data/lib/vagrant-conoha/client/nova.rb +212 -0
  45. data/lib/vagrant-conoha/client/openstack.rb +59 -0
  46. data/lib/vagrant-conoha/client/request_logger.rb +23 -0
  47. data/lib/vagrant-conoha/client/rest_utils.rb +25 -0
  48. data/lib/vagrant-conoha/command/abstract_command.rb +51 -0
  49. data/lib/vagrant-conoha/command/flavor_list.rb +24 -0
  50. data/lib/vagrant-conoha/command/image_list.rb +29 -0
  51. data/lib/vagrant-conoha/command/main.rb +51 -0
  52. data/lib/vagrant-conoha/command/network_list.rb +25 -0
  53. data/lib/vagrant-conoha/command/openstack_command.rb +16 -0
  54. data/lib/vagrant-conoha/command/reset.rb +20 -0
  55. data/lib/vagrant-conoha/command/subnet_list.rb +22 -0
  56. data/lib/vagrant-conoha/command/utils.rb +22 -0
  57. data/lib/vagrant-conoha/command/volume_list.rb +25 -0
  58. data/lib/vagrant-conoha/config.rb +390 -0
  59. data/lib/vagrant-conoha/config/http.rb +39 -0
  60. data/lib/vagrant-conoha/config_resolver.rb +285 -0
  61. data/lib/vagrant-conoha/errors.rb +187 -0
  62. data/lib/vagrant-conoha/logging.rb +39 -0
  63. data/lib/vagrant-conoha/plugin.rb +48 -0
  64. data/lib/vagrant-conoha/provider.rb +50 -0
  65. data/lib/vagrant-conoha/utils.rb +26 -0
  66. data/lib/vagrant-conoha/version.rb +15 -0
  67. data/lib/vagrant-conoha/version_checker.rb +76 -0
  68. data/locales/en.yml +393 -0
  69. data/spec/vagrant-conoha/action/connect_openstack_spec.rb +695 -0
  70. data/spec/vagrant-conoha/action/create_server_spec.rb +225 -0
  71. data/spec/vagrant-conoha/action/create_stack_spec.rb +99 -0
  72. data/spec/vagrant-conoha/action/delete_server_spec.rb +89 -0
  73. data/spec/vagrant-conoha/action/delete_stack_spec.rb +63 -0
  74. data/spec/vagrant-conoha/action/message_spec.rb +33 -0
  75. data/spec/vagrant-conoha/action/provision_spec.rb +104 -0
  76. data/spec/vagrant-conoha/action/read_ssh_info_spec.rb +190 -0
  77. data/spec/vagrant-conoha/action/read_state_spec.rb +81 -0
  78. data/spec/vagrant-conoha/action/resume_server_spec.rb +49 -0
  79. data/spec/vagrant-conoha/action/start_server_spec.rb +49 -0
  80. data/spec/vagrant-conoha/action/stop_server_spec.rb +49 -0
  81. data/spec/vagrant-conoha/action/suspend_server_spec.rb +49 -0
  82. data/spec/vagrant-conoha/action/sync_folders_spec.rb +155 -0
  83. data/spec/vagrant-conoha/action/wait_accessible_spec.rb +67 -0
  84. data/spec/vagrant-conoha/action/wait_active_spec.rb +53 -0
  85. data/spec/vagrant-conoha/action/wait_stop_spec.rb +53 -0
  86. data/spec/vagrant-conoha/action_spec.rb +120 -0
  87. data/spec/vagrant-conoha/client/cinder_spec.rb +127 -0
  88. data/spec/vagrant-conoha/client/glance_spec.rb +143 -0
  89. data/spec/vagrant-conoha/client/heat_spec.rb +128 -0
  90. data/spec/vagrant-conoha/client/keystone_spec.rb +150 -0
  91. data/spec/vagrant-conoha/client/neutron_spec.rb +171 -0
  92. data/spec/vagrant-conoha/client/nova_spec.rb +757 -0
  93. data/spec/vagrant-conoha/client/utils_spec.rb +176 -0
  94. data/spec/vagrant-conoha/command/flavor_list_spec.rb +43 -0
  95. data/spec/vagrant-conoha/command/image_list_spec.rb +95 -0
  96. data/spec/vagrant-conoha/command/network_list_spec.rb +65 -0
  97. data/spec/vagrant-conoha/command/reset_spec.rb +24 -0
  98. data/spec/vagrant-conoha/command/subnet_list_spec.rb +45 -0
  99. data/spec/vagrant-conoha/command/volume_list_spec.rb +40 -0
  100. data/spec/vagrant-conoha/config_resolver_spec.rb +860 -0
  101. data/spec/vagrant-conoha/config_spec.rb +373 -0
  102. data/spec/vagrant-conoha/e2e_spec.rb.save +27 -0
  103. data/spec/vagrant-conoha/provider_spec.rb +13 -0
  104. data/spec/vagrant-conoha/spec_helper.rb +37 -0
  105. data/spec/vagrant-conoha/utils_spec.rb +129 -0
  106. data/spec/vagrant-conoha/version_checker_spec.rb +39 -0
  107. data/stackrc +25 -0
  108. data/vagrant-conoha.gemspec +32 -0
  109. metadata +343 -0
@@ -0,0 +1,33 @@
1
+ require 'vagrant-conoha/spec_helper'
2
+
3
+ describe VagrantPlugins::ConoHa::Action::Message do
4
+ let(:ui) do
5
+ double('ui').tap do |ui|
6
+ ui.stub(:info).with(anything)
7
+ ui.stub(:error).with(anything)
8
+ end
9
+ end
10
+
11
+ let(:env) do
12
+ {}.tap do |env|
13
+ env[:ui] = ui
14
+ end
15
+ end
16
+
17
+ let(:app) do
18
+ double('app').tap do |app|
19
+ app.stub(:call).with(anything)
20
+ end
21
+ end
22
+
23
+ describe 'call' do
24
+ context 'when message is given' do
25
+ it 'print out the message' do
26
+ expect(ui).to receive(:info).with('Message to show')
27
+ expect(app).to receive(:call)
28
+ @action = Message.new(app, nil, 'Message to show')
29
+ @action.call(env)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,104 @@
1
+ require 'vagrant-conoha/spec_helper'
2
+
3
+ #
4
+ # Stubing all the interactions using the real
5
+ # provisioner classes is somehow complicated...
6
+ #
7
+ class FakeProvisioner
8
+ def provision
9
+ end
10
+ end
11
+
12
+ class FakeShellProvisioner < FakeProvisioner
13
+ attr_accessor :config
14
+
15
+ def initialize(config)
16
+ @config = config
17
+ end
18
+ end
19
+
20
+ #
21
+ # Monkeypatch the VagrantPlugins::Shell module
22
+ # to enabled using an FakeShellProvisioner in
23
+ # place of a the real shell provisioner class
24
+ #
25
+ module VagrantPlugins
26
+ module Shell
27
+ Provisioner = FakeShellProvisioner
28
+ end
29
+ end
30
+
31
+ describe VagrantPlugins::ConoHa::Action::ProvisionWrapper do
32
+ let(:app) do
33
+ double
34
+ end
35
+
36
+ let(:internal_provision_wrapper) do
37
+ double
38
+ end
39
+
40
+ before :each do
41
+ @action = ProvisionWrapper.new(app, nil)
42
+ end
43
+
44
+ describe 'execute' do
45
+ it 'call InternalProvisionWrapper and conitnue the middleware chain' do
46
+ expect(internal_provision_wrapper).to receive(:call)
47
+ InternalProvisionWrapper.stub(:new) { internal_provision_wrapper }
48
+ app.stub(:call) {}
49
+ @action.execute nil
50
+ end
51
+ end
52
+ end
53
+
54
+ describe VagrantPlugins::ConoHa::Action::InternalProvisionWrapper do
55
+ let(:env) do
56
+ {}
57
+ end
58
+
59
+ before :each do
60
+ @action = InternalProvisionWrapper.new(nil, env)
61
+ end
62
+
63
+ describe 'run_provisioner' do
64
+ context 'when running a shell provisioner' do
65
+ context 'without meta-arg' do
66
+ it 'does not change the provisioner config' do
67
+ env[:provisioner] = FakeShellProvisioner.new(OpenStruct.new.tap do |c|
68
+ c.args = %w(arg1 arg2)
69
+ end)
70
+
71
+ expect(env[:provisioner]).to receive(:provision)
72
+ expect(@action).to receive(:handle_shell_meta_args)
73
+
74
+ @action.run_provisioner(env)
75
+ expect(env[:provisioner].config.args).to eq(%w(arg1 arg2))
76
+ end
77
+ end
78
+
79
+ context 'with @@ssh_ip@@ meta-arg' do
80
+ it 'replace the meta-args in the provisioner config' do
81
+ env[:provisioner] = FakeShellProvisioner.new(OpenStruct.new.tap do |c|
82
+ c.args = ['arg1', '@@ssh_ip@@', 'arg3']
83
+ end)
84
+
85
+ VagrantPlugins::ConoHa::Action.stub(:get_ssh_info).and_return host: '192.168.0.1'
86
+ expect(env[:provisioner]).to receive(:provision)
87
+
88
+ @action.run_provisioner(env)
89
+ expect(env[:provisioner].config.args).to eq(%w(arg1 192.168.0.1 arg3))
90
+ end
91
+ end
92
+ end
93
+
94
+ context 'when running a provisioner other that the shell provisioner' do
95
+ it 'does not call handle_shell_meta_args' do
96
+ env[:provisioner] = FakeProvisioner.new
97
+ expect(@action).should_not_receive(:handle_shell_meta_args)
98
+ expect(env[:provisioner]).to receive(:provision)
99
+
100
+ @action.run_provisioner(env)
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,190 @@
1
+ require 'vagrant-conoha/spec_helper'
2
+
3
+ include VagrantPlugins::ConoHa::Action
4
+ include VagrantPlugins::ConoHa::HttpUtils
5
+ include VagrantPlugins::ConoHa::Domain
6
+
7
+ describe VagrantPlugins::ConoHa::Action::ReadSSHInfo do
8
+ let(:config) do
9
+ double('config').tap do |config|
10
+ config.stub(:openstack_auth_url) { 'http://keystoneAuthV2' }
11
+ config.stub(:openstack_compute_url) { nil }
12
+ config.stub(:openstack_network_url) { nil }
13
+ config.stub(:tenant_name) { 'testTenant' }
14
+ config.stub(:username) { 'username' }
15
+ config.stub(:password) { 'password' }
16
+ config.stub(:ssh_username) { 'test_username' }
17
+ config.stub(:keypair_name) { nil }
18
+ config.stub(:public_key_path) { nil }
19
+ config.stub(:ssh_disabled) { false }
20
+ end
21
+ end
22
+
23
+ let(:nova) do
24
+ double('nova').tap do |nova|
25
+ nova.stub(:get_server_details).with(env, '1234') do
26
+ {
27
+ 'addresses' => {
28
+ 'net' => [
29
+ {
30
+ 'addr' => '80.80.80.80',
31
+ 'OS-EXT-IPS:type' => 'fixed',
32
+ 'version' => 4
33
+ }
34
+ ]
35
+ }
36
+ }
37
+ end
38
+ end
39
+ end
40
+
41
+ let(:ssh_config) do
42
+ double('ssh_config').tap do |config|
43
+ config.stub(:username) { 'sshuser' }
44
+ config.stub(:port) { nil }
45
+ end
46
+ end
47
+
48
+ let(:machine_config) do
49
+ double('machine_config').tap do |config|
50
+ config.stub(:ssh) { ssh_config }
51
+ end
52
+ end
53
+
54
+ let(:env) do
55
+ {}.tap do |env|
56
+ env[:ui] = double('ui')
57
+ env[:ui].stub(:info).with(anything)
58
+ env[:machine] = double('machine')
59
+ env[:machine].stub(:provider_config) { config }
60
+ env[:machine].stub(:config) { machine_config }
61
+ env[:machine].stub(:id) { '1234' }
62
+ env[:machine].stub(:data_dir) { '/data/dir' }
63
+ env[:openstack_client] = double('openstack_client')
64
+ env[:openstack_client].stub(:neutron) { neutron }
65
+ env[:openstack_client].stub(:nova) { nova }
66
+ end
67
+ end
68
+
69
+ let(:app) do
70
+ double('app').tap do |app|
71
+ app.stub(:call).with(anything)
72
+ end
73
+ end
74
+
75
+ before :each do
76
+ ReadSSHInfo.send(:public, *ReadSSHInfo.private_instance_methods)
77
+ @action = ReadSSHInfo.new(app, env)
78
+ end
79
+
80
+ describe 'call' do
81
+ context 'when called three times' do
82
+ it 'read ssh info only once' do
83
+ config.stub(:keypair_name) { 'my_keypair' }
84
+ @action.stub(:read_ssh_info) { { host: '', port: '', username: '' } }
85
+ expect(@action).to receive(:read_ssh_info).exactly(1).times
86
+ expect(app).to receive(:call)
87
+ (1..3).each { @action.call(env) }
88
+ end
89
+ end
90
+ end
91
+
92
+ describe 'read_ssh_info' do
93
+ context 'with deprecated ssh_username specified' do
94
+ context 'with ssh.username specified' do
95
+ it 'returns ssh.username' do
96
+ ssh_config.stub(:username) { 'sshuser' }
97
+ config.stub(:ssh_username) { 'test_username' }
98
+ config.stub(:floating_ip) { '80.80.80.80' }
99
+ config.stub(:keypair_name) { 'my_keypair' }
100
+ @action.read_ssh_info(env).should eq(host: '80.80.80.80', port: 22, username: 'sshuser', log_level: 'ERROR')
101
+ end
102
+ end
103
+ context 'without ssh.username specified' do
104
+ it 'returns ssh.username' do
105
+ ssh_config.stub(:username) { nil }
106
+ config.stub(:ssh_username) { 'test_username' }
107
+ config.stub(:floating_ip) { '80.80.80.80' }
108
+ config.stub(:keypair_name) { 'my_keypair' }
109
+ @action.read_ssh_info(env).should eq(host: '80.80.80.80', port: 22, username: 'test_username', log_level: 'ERROR')
110
+ end
111
+ end
112
+ end
113
+
114
+ context 'with ssh.port overriden' do
115
+ it 'returns ssh.port' do
116
+ ssh_config.stub(:port) { 33 }
117
+ config.stub(:floating_ip) { '80.80.80.80' }
118
+ config.stub(:keypair_name) { 'my_keypair' }
119
+ @action.read_ssh_info(env).should eq(host: '80.80.80.80', port: 33, username: 'sshuser', log_level: 'ERROR')
120
+ end
121
+ end
122
+
123
+ context 'with config.floating_ip specified' do
124
+ context 'with keypair_name specified' do
125
+ it 'returns the specified floating ip' do
126
+ config.stub(:floating_ip) { '80.80.80.80' }
127
+ config.stub(:keypair_name) { 'my_keypair' }
128
+ @action.read_ssh_info(env).should eq(host: '80.80.80.80', port: 22, username: 'sshuser', log_level: 'ERROR')
129
+ end
130
+ end
131
+
132
+ context 'with public_key_path specified' do
133
+ it 'returns the specified floating ip' do
134
+ config.stub(:floating_ip) { '80.80.80.80' }
135
+ config.stub(:keypair_name) { nil }
136
+ config.stub(:public_key_path) { '/public/key/path' }
137
+ @action.read_ssh_info(env).should eq(host: '80.80.80.80', port: 22, username: 'sshuser', log_level: 'ERROR')
138
+ end
139
+ end
140
+
141
+ context 'with neither keypair_name nor public_key_path specified' do
142
+ it 'returns the specified floating ip ' do
143
+ config.stub(:floating_ip) { '80.80.80.80' }
144
+ config.stub(:keypair_name) { nil }
145
+ config.stub(:public_key_path) { nil }
146
+ nova.stub(:get_server_details) do
147
+ {
148
+ 'key_name' => 'my_keypair_name',
149
+ 'addresses' => {
150
+ 'net' => [
151
+ {
152
+ 'addr' => '80.80.80.80',
153
+ 'OS-EXT-IPS:type' => 'floating'
154
+ }
155
+ ]
156
+ }
157
+ }
158
+ end
159
+ expect(nova).to receive(:get_server_details).with(env, '1234')
160
+ @action.read_ssh_info(env).should eq(
161
+ host: '80.80.80.80',
162
+ port: 22,
163
+ username: 'sshuser',
164
+ private_key_path: '/data/dir/my_keypair_name',
165
+ log_level: 'ERROR')
166
+ end
167
+ end
168
+ end
169
+
170
+ context 'without config.floating_ip specified' do
171
+ it 'return the a floating_ip found by querying server details' do
172
+ nova.stub(:get_server_details).with(env, '1234') do
173
+ {
174
+ 'addresses' => {
175
+ 'toto' => [{
176
+ 'addr' => '13.13.13.13'
177
+ }, {
178
+ 'addr' => '12.12.12.12',
179
+ 'OS-EXT-IPS:type' => 'fixed',
180
+ 'version' => 4
181
+ }]
182
+ }
183
+ }
184
+ end
185
+ config.stub(:keypair_name) { 'my_keypair' }
186
+ @action.read_ssh_info(env).should eq(host: '12.12.12.12', port: 22, username: 'sshuser', log_level: 'ERROR')
187
+ end
188
+ end
189
+ end
190
+ end
@@ -0,0 +1,81 @@
1
+ require 'vagrant-conoha/spec_helper'
2
+
3
+ describe VagrantPlugins::ConoHa::Action::ReadState do
4
+ let(:nova) do
5
+ double('nova')
6
+ end
7
+
8
+ let(:env) do
9
+ {}.tap do |env|
10
+ env[:ui] = double('ui').tap do |ui|
11
+ ui.stub(:info).with(anything)
12
+ ui.stub(:error).with(anything)
13
+ end
14
+ env[:openstack_client] = double('openstack_client').tap do |os|
15
+ os.stub(:nova) { nova }
16
+ end
17
+ env[:machine] = OpenStruct.new
18
+ end
19
+ end
20
+
21
+ let(:app) do
22
+ double('app').tap do |app|
23
+ app.stub(:call).with(anything)
24
+ end
25
+ end
26
+
27
+ describe 'call' do
28
+ context 'when server id is present' do
29
+ it 'set the state to the vm_state returned by nova' do
30
+ env[:machine].id = 'server_id'
31
+ nova.stub(:get_server_details).and_return('status' => 'ACTIVE')
32
+
33
+ expect(nova).to receive(:get_server_details).with(env, 'server_id')
34
+ expect(app).to receive(:call)
35
+
36
+ @action = ReadState.new(app, nil)
37
+ @action.call(env)
38
+
39
+ expect(env[:machine_state_id]).to eq(:active)
40
+ end
41
+ it 'set the state to the task_state returned by nova extension' do
42
+ env[:machine].id = 'server_id'
43
+ nova.stub(:get_server_details).and_return('OS-EXT-STS:task_state' => 'SUSPENDING')
44
+
45
+ expect(nova).to receive(:get_server_details).with(env, 'server_id')
46
+ expect(app).to receive(:call)
47
+
48
+ @action = ReadState.new(app, nil)
49
+ @action.call(env)
50
+
51
+ expect(env[:machine_state_id]).to eq(:suspending)
52
+ end
53
+ end
54
+ context 'when server id is not present' do
55
+ it 'set the state to :not_created' do
56
+ env[:machine].id = nil
57
+ expect(nova).to_not receive(:get_server_details)
58
+ expect(app).to receive(:call)
59
+
60
+ @action = ReadState.new(app, nil)
61
+ @action.call(env)
62
+
63
+ expect(env[:machine_state_id]).to eq(:not_created)
64
+ end
65
+ end
66
+ context 'when server cannot be found' do
67
+ it 'set the state to :not_created' do
68
+ env[:machine].id = 'server_id'
69
+ nova.stub(:get_server_details).and_return(nil)
70
+
71
+ expect(nova).to receive(:get_server_details).with(env, 'server_id')
72
+ expect(app).to receive(:call)
73
+
74
+ @action = ReadState.new(app, nil)
75
+ @action.call(env)
76
+
77
+ expect(env[:machine_state_id]).to eq(:not_created)
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,49 @@
1
+ require 'vagrant-conoha/spec_helper'
2
+
3
+ describe VagrantPlugins::ConoHa::Action::Resume do
4
+ let(:nova) do
5
+ double('nova').tap do |nova|
6
+ nova.stub(:resume_server)
7
+ end
8
+ end
9
+
10
+ let(:env) do
11
+ {}.tap do |env|
12
+ env[:ui] = double('ui').tap do |ui|
13
+ ui.stub(:info).with(anything)
14
+ ui.stub(:error).with(anything)
15
+ end
16
+ env[:openstack_client] = double('openstack_client').tap do |os|
17
+ os.stub(:nova) { nova }
18
+ end
19
+ env[:machine] = OpenStruct.new
20
+ end
21
+ end
22
+
23
+ let(:app) do
24
+ double('app').tap do |app|
25
+ app.stub(:call).with(anything)
26
+ end
27
+ end
28
+
29
+ describe 'call' do
30
+ context 'when server id is present' do
31
+ it 'starts the server' do
32
+ env[:machine].id = 'server_id'
33
+ expect(nova).to receive(:resume_server).with(env, 'server_id')
34
+ expect(app).to receive(:call)
35
+ @action = Resume.new(app, nil)
36
+ @action.call(env)
37
+ end
38
+ end
39
+ context 'when server id is not present' do
40
+ it 'does nothing' do
41
+ env[:machine].id = nil
42
+ expect(nova).to_not receive(:resume_server)
43
+ expect(app).to receive(:call)
44
+ @action = Resume.new(app, nil)
45
+ @action.call(env)
46
+ end
47
+ end
48
+ end
49
+ end