-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
143 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require 'erb' | ||
|
||
Given(/^a '\.tugboat' config with data:$/) do |data_str| | ||
data = ERB.new(data_str).result(binding) | ||
File.write("#{Dir.pwd}/tmp/aruba/.tugboat", data) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,40 @@ | ||
require 'aruba/cucumber' | ||
require 'aruba/in_process' | ||
require 'aruba/spawn_process' | ||
require 'vcr' | ||
require 'webmock' | ||
require 'tugboat' | ||
|
||
Before do | ||
VCR.configure do |c| | ||
c.hook_into :webmock | ||
c.cassette_library_dir = 'features/cassettes' | ||
c.default_cassette_options = { :record => :new_episodes } | ||
end | ||
|
||
VCR.cucumber_tags do |t| | ||
t.tag '@vcr', :use_scenario_name => true | ||
end | ||
|
||
After do | ||
class VcrFriendlyMain | ||
def initialize(argv, stdin, stdout, stderr, kernel) | ||
@argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel | ||
end | ||
|
||
def execute! | ||
$stdin = @stdin | ||
$stdout = @stdout | ||
Tugboat::CLI.start(@argv) | ||
end | ||
end | ||
|
||
Before('@vcr') do | ||
Aruba::InProcess.main_class = VcrFriendlyMain | ||
Aruba.process = Aruba::InProcess | ||
end | ||
|
||
After('@vcr') do | ||
Aruba.process = Aruba::SpawnProcess | ||
$stdin = STDIN | ||
$stdout = STDOUT | ||
VCR.eject_cassette | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Feature: config | ||
In order to have an easier time connecting to droplets | ||
As a user | ||
I should be able to supply an array of ssh keys for a machine | ||
|
||
@vcr | ||
Scenario: Array of SSH Keys in Config | ||
Given a '.tugboat' config with data: | ||
""" | ||
--- | ||
authentication: | ||
access_token: f8sazukxeh729ggxh9gjavvzw5cabdpq95txpzhz6ep6jvtquxztfkf2chyejcsg5 | ||
ssh: | ||
ssh_user: bobby_sousa | ||
ssh_key_path: "~/.ssh/id_rsa" | ||
ssh_port: '22' | ||
defaults: | ||
region: nyc2 | ||
image: ubuntu-14-04-x64 | ||
size: 512mb | ||
ssh_key: ['1234','5678'] | ||
private_networking: 'false' | ||
backups_enabled: 'false' | ||
ip6: 'false' | ||
""" | ||
When I run `tugboat create droplet-with-array-of-keys` | ||
Then the exit status should not be 1 | ||
And the output should contain "Queueing creation of droplet 'droplet-with-array-of-keys'...Droplet created!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters