Development environment fails to run tests without msfdb --msf-test-db-user-name option
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the development-environment setup guide and the ./msfdb init entry point, then reproduce the failure with rake spec. Trace how the msftest database is created and which user owns it. Done means a fresh setup can run rake spec without the manual --msf-test-db-user-name workaround.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Ruby
- Stars
- 39k
- Forks
- 15k
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 32
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rapid7/metasploit-framework
-
suggestion-docs
Difficulty 1/5 Under an hour Newbie friendliness 88/100
rapid7/metasploit-framework#21669 · 2 comments · 1 reaction ·
-
suggestion-docs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
rapid7/metasploit-framework#21503 · 2 comments ·
-
suggestion-docs
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rapid7/metasploit-framework#20663 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
rapid7/metasploit-framework#21919 ·
-
suggestion-module
rapid7/metasploit-framework#21907 · 1 comment · 1 assignee ·
All issues in rapid7/metasploit-framework
Similar issues
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
TheOdinProject/curriculum#31402 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100