Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
move v2 spec to v1 and make it work again
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Schmidt & Ian Baker committed Mar 26, 2013
1 parent 6a8f49d commit 30e7a7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 39 deletions.
3 changes: 0 additions & 3 deletions spec/assets/hello-sinatra/config.ru

This file was deleted.

@@ -1,14 +1,14 @@
require "spec_helper"
require "webmock/rspec"

if ENV['VMC_V2_TEST_USER'] && ENV['VMC_V2_TEST_PASSWORD'] && ENV['VMC_V2_TEST_TARGET']
describe 'A new user tries to use VMC against v2', :ruby19 => true do
if ENV['VMC_TEST_USER'] && ENV['VMC_TEST_PASSWORD'] && ENV['VMC_TEST_TARGET']
describe 'A new user tries to use VMC against v1', :ruby19 => true do
include ConsoleAppSpeckerMatchers
include VMC::Interactive

let(:target) { ENV['VMC_V2_TEST_TARGET'] }
let(:username) { ENV['VMC_V2_TEST_USER'] }
let(:password) { ENV['VMC_V2_TEST_PASSWORD'] }
let(:target) { ENV['VMC_TEST_TARGET'] }
let(:username) { ENV['VMC_TEST_USER'] }
let(:password) { ENV['VMC_TEST_PASSWORD'] }

let(:app) do
fuzz = TRAVIS_BUILD_ID.to_s + Time.new.to_f.to_s.gsub(".", "_")
Expand Down Expand Up @@ -41,22 +41,6 @@
runner.send_keys password

expect(runner).to say "Authenticating... OK"

expect(runner).to say(
"Organization>" => proc {
runner.send_keys "1"
expect(runner).to say /Switching to organization .*\.\.\. OK/
},
"Switching to organization" => proc {}
)

expect(runner).to say(
"Space>" => proc {
runner.send_keys "1"
expect(runner).to say /Switching to space .*\.\.\. OK/
},
"Switching to space" => proc {}
)
end

run("#{vmc_bin} app #{app}") do |runner|
Expand All @@ -71,32 +55,25 @@
expect(runner).to say "Instances> 1"
runner.send_keys ""

expect(runner).to say "Custom startup command> "
runner.send_keys "bundle exec ruby main.rb -p $PORT"
expect(runner).to say "Framework> sinatra"
runner.send_keys ""

expect(runner).to say "Runtime>"
runner.send_keys "1"

expect(runner).to say "Memory Limit>"
runner.send_keys "64M"

expect(runner).to say "Creating #{app}... OK"

expect(runner).to say "Subdomain> #{app}"
runner.send_keys ""

expect(runner).to say "1:"
expect(runner).to say "Domain>"
expect(runner).to say "Domain> #{app}"
runner.send_keys "1"

expect(runner).to say(/Creating route #{app}\..*\.\.\. OK/)
expect(runner).to say(/Binding #{app}\..* to #{app}\.\.\. OK/)
expect(runner).to say "Updating #{app}... OK"

expect(runner).to say "Create services for application?> n"
runner.send_keys ""

# skip this
if runner.expect "Bind other services to application?> n", 1
runner.send_keys ""
end

expect(runner).to say "Save configuration?> n"
runner.send_keys ""

Expand All @@ -117,5 +94,5 @@
end
end
else
$stderr.puts 'Skipping v2 integration specs; please provide $VMC_V2_TEST_TARGET, $VMC_V2_TEST_USER, and $VMC_V2_TEST_PASSWORD'
$stderr.puts 'Skipping v1 integration specs; please provide $VMC_TEST_TARGET, $VMC_TEST_USER, and $VMC_TEST_PASSWORD'
end

0 comments on commit 30e7a7e

Please sign in to comment.