Skip to content

Commit 0f6b053

Browse files
committed
Configure travis-ci to use database for rake spec
[#46224565]
1 parent 2604fad commit 0f6b053

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ language: ruby
22
before_install:
33
- sudo apt-get update -qq
44
- sudo apt-get install -qq libpcap-dev
5+
before_script:
6+
- cp config/database.yml.travis config/database.yml
7+
- rake db:create
8+
- rake db:migrate
59

610
rvm:
711
#- '1.8.7'

config/database.yml.travis

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# @note This file is only for use in travis-ci. If you need to make a
2+
# config/database.yml for running rake, rake spec, or rspec locally, please
3+
# customize `conifg/database.yml.example`
4+
#
5+
# @example Customizing config/database.yml.example
6+
# cp config/database.yml.example config/database.yml
7+
# # update password fields for each environment's user
8+
9+
# Using the postgres user locally without a host and port is the supported
10+
# configuration from Travis-CI
11+
#
12+
# @see http://about.travis-ci.org/docs/user/database-setup/#PostgreSQL
13+
development: &pgsql
14+
adapter: postgresql
15+
database: metasploit_framework_development
16+
username: postgres
17+
pool: 5
18+
timeout: 5
19+
20+
# Warning: The database defined as "test" will be erased and
21+
# re-generated from your development database when you run "rake".
22+
# Do not set this db to the same as development or production.
23+
#
24+
# Note also, sqlite3 is totally unsupported by Metasploit now.
25+
test:
26+
<<: *pgsql
27+
database: metasploit_framework_test

0 commit comments

Comments
 (0)