Project "database.yml" scenario

MSP-11153
This commit is contained in:
Luke Imhoff 2014-08-27 21:47:31 -05:00
parent e6750b985c
commit 7453f6fa3a
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
1 changed files with 21 additions and 1 deletions

View File

@ -115,4 +115,24 @@ Feature: `msfconsole` `database.yml`
When I run `msfconsole --environment test` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
And I type "exit"
Then the output should contain "user_metasploit_framework_test"
Then the output should contain "user_metasploit_framework_test"
Scenario: Without --yaml, MSF_DATABASE_CONFIG or ~/.msf4/database.yml, project "database.yml" wins
Given I unset the environment variables:
| variable |
| MSF_DATABASE_CONFIG |
And a directory named "home"
And I cd to "home"
And a mocked home directory
And I cd to "../.."
And the project "database.yml" exists with:
"""
test:
adapter: postgresql
database: project_metasploit_framework_test
username: project_metasploit_framework_test
"""
When I run `msfconsole --environment test` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
And I type "exit"
Then the output should contain "project_metasploit_framework_test"