Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development environment fails to run tests without msfdb --msf-test-db-user-name option #16183

Open
Lazula opened this issue Feb 13, 2022 · 2 comments
Labels
bug confirmed Issues confirmed by a committer

Comments

@Lazula
Copy link

Lazula commented Feb 13, 2022

Steps to reproduce

Follow the setup steps, including starting the database with ./msfdb init. No errors are reported until running rake spec.

Were you following a specific guide/tutorial or reading documentation?

https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment

Expected behavior

The test suite should run.

Current behavior

rake spec fails with the error ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be owner of database msftest.

Fix

I was able to fix the problem by running ./msfdb delete to remove the problematic database and using ./msfdb init --msf-test-db-user-name $(whoami). After this, rake spec runs the tests as expected.

Metasploit version

953a4cb5dc0e6fa2dc0ba0fccf073f96403f4ce2 (HEAD -> master, origin/master, origin/HEAD) Land #16171, Generate links to new docs site

@Lazula Lazula added the bug label Feb 13, 2022
@github-actions
Copy link

Hi!

This issue has been left open with no activity for a while now.

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

@github-actions github-actions bot added the Stale Marks an issue as stale, to be closed if no action is taken label Mar 16, 2022
@adfoster-r7 adfoster-r7 removed the Stale Marks an issue as stale, to be closed if no action is taken label Mar 16, 2022
@adfoster-r7
Copy link
Contributor

adfoster-r7 commented Mar 16, 2022

I haven't set up a fresh environment in a while; but my workflow for running tests involves setting up the database with bundle exec rake db:migrate RAILS_ENV=test

I'll keep this open for now 👍

@adfoster-r7 adfoster-r7 added the confirmed Issues confirmed by a committer label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed Issues confirmed by a committer
Projects
None yet
Development

No branches or pull requests

2 participants