Skip to content

Commit 7453f6f

Browse files
committed
Project "database.yml" scenario
MSP-11153
1 parent e6750b9 commit 7453f6f

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

features/msfconsole/database_yml.feature

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,24 @@ Feature: `msfconsole` `database.yml`
115115
When I run `msfconsole --environment test` interactively
116116
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
117117
And I type "exit"
118-
Then the output should contain "user_metasploit_framework_test"
118+
Then the output should contain "user_metasploit_framework_test"
119+
120+
Scenario: Without --yaml, MSF_DATABASE_CONFIG or ~/.msf4/database.yml, project "database.yml" wins
121+
Given I unset the environment variables:
122+
| variable |
123+
| MSF_DATABASE_CONFIG |
124+
And a directory named "home"
125+
And I cd to "home"
126+
And a mocked home directory
127+
And I cd to "../.."
128+
And the project "database.yml" exists with:
129+
"""
130+
test:
131+
adapter: postgresql
132+
database: project_metasploit_framework_test
133+
username: project_metasploit_framework_test
134+
"""
135+
When I run `msfconsole --environment test` interactively
136+
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
137+
And I type "exit"
138+
Then the output should contain "project_metasploit_framework_test"

0 commit comments

Comments
 (0)