Skip to content

Commit

Permalink
Fix DB paths for darwin and windows
Browse files Browse the repository at this point in the history
Add travis to the firebird group so it can validate FB file existence

Ensure DBs dir exists and is chown'd, reload groups after travis assignment

Fix group memebership per travis docs

When a scalpel doesn't work, try a sledgehammer
  • Loading branch information
cheald committed Mar 5, 2018
1 parent 8836e13 commit 2964308
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ install:
before_script:
- export ISC_PASSWORD=$(sudo grep ISC_PASSWORD /etc/firebird/2.5/SYSDBA.password | ruby -e "puts STDIN.read.split(/[=\"]/)[2]")
- echo "modify sysdba -pw masterkey" | gsec -user SYSDBA -password $ISC_PASSWORD
- sudo mkdir -p /tmp/firebird
- sudo chown firebird.firebird /tmp/firebird
- sudo chmod 0777 /tmp/firebird
script:
- bundle exec rake compile:fb_ext test
rvm:
Expand Down
8 changes: 7 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ def teardown

def get_db_conn_params(dbname = nil)
dbname ||= "drivertest.%s.fdb" % SecureRandom.hex(24)
db_file = File.join(Dir.tmpdir, dbname)

db_file = case RUBY_PLATFORM
when /win32/
File.join("c:", "var", "fbdata", dbname)
else
File.join("/", "tmp", "firebird", dbname)
end
{
:database => "localhost:#{db_file}",
:username => "sysdba",
Expand Down

0 comments on commit 2964308

Please sign in to comment.