-
Notifications
You must be signed in to change notification settings - Fork 19
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
Adjust instructions for running EF integration tests #457
base: main
Are you sure you want to change the base?
Conversation
No New Or Fixed Issues Found |
224b67a
to
8b5527f
Compare
Deploying contributing-docs with Cloudflare Pages
|
8b5527f
to
05d0165
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
"databases:0:type": "Postgres", | ||
"databases:0:connectionString": "Host=localhost;Username=postgres;Password=_________;Database=ef_test", | ||
"databases:0:enabled": "true", | ||
"databases:1:type": "Sqlite", | ||
"databases:1:enabled": "true", | ||
"databases:1:connectionString": "Data Source=_________", | ||
"databases:2:type": "MySql", | ||
"databases:2:connectionString": "server=localhost;uid=root;pwd=_________;database=ef_test", | ||
"databases:2:enabled": "true", | ||
"databases:3:type": "SqlServer", | ||
"databases:3:connectionString": "Server=localhost;Database=ef_test;User Id=SA;Password=_________;Encrypt=True;TrustServerCertificate=True;", | ||
"databases:3:enabled": "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested changing the format of these user secrets. If you do that, this will need to be updated. If you don't want to do that, then we should at least note here (maybe in a callout) that the index of each type must be maintained for the migrate script to work.
- This block is used for your primary Bitwarden database for each supported provider type. These are | ||
what your running development server will connect to. You should already have passwords set up in | ||
this block. | ||
- If you do: ensure the username/password combos for each of your global database types are | ||
applied to their siblings in the `databases` block. | ||
- If you do not: please see the user secrets section of the server setup guide for doing this. | ||
``` | ||
"sqlServer": { | ||
"connectionString": "Server=localhost;Database=vault_dev;User Id=SA;Password=___________;Encrypt=True;TrustServerCertificate=True;" | ||
}, | ||
"postgreSql": { | ||
"connectionString": "Host=localhost;Username=postgres;Password=_________;Database=vault_dev" | ||
}, | ||
"mySql": { | ||
"connectionString": "server=localhost;uid=root;pwd=_________;database=vault_dev" | ||
}, | ||
"sqlite": { | ||
"connectionString": "Data Source=/path/to/bitwardenServer/repository/server/dev/db/bitwarden.sqlite" | ||
}, | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is required. It's already covered in the sections above so this is largely repeating information. I think you could just start with the following paragraph and it would work just as well or better.
|
||
You can then run just those tests from the `test/Infrastructure.IntegrationTest` folder using | ||
`dotnet test`. | ||
In your `server/dev/secrets.json` file find these two blocks of secrets: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Theserver/
prefix might be confusing for some. This name is not guaranteed and we never reference it anywhere. It's almost always secrets.json
.
``` | ||
|
||
With connection strings applied to your projects: ensure your databases are all migrated using | ||
`pwsh server/dev/migrate.ps1 --all`. Then you can run EF tests from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Theserver/
prefix might be confusing for some and it's not guaranteed.
You can then run just those tests from the `test/Infrastructure.IntegrationTest` folder using | ||
`dotnet test`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this text more.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-10863
📔 Objective
This commit adds up to date documentation for running entity framework integration tests for
server
. It has a companion PR for adding some of the mentioned functionality in bitwarden/server#4912📸 Screenshots
⏰ Reminders before review
team
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes