mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
[PM-2444] Add Pipeline for Testing All Database Variants in CI (#2471)
* Add Pipeline * Fix Lint * Added a Change * Update Pipeline * Add Multi-Version Support * Use Profile Switch for each profile * Fix MySql * Debug MySql * Use Proper Seperator * Add Allow User Variables=true * Pipeline Work * Expand Config for Postgres * Change Config Key * Add Debug Step * Fix Debug Step * Fix Tests * Add Sleep * Fix Tests * Fix SQL Server Tests * Add Sqlite * Use Context Property * Fix Tests * Fix Test Logger * Update AccountRevisionDate Check * Fix Postgres Time Issues * Formatting and Pipeline Update * Remove Unneeded SqlServer Setting * Update .github/workflows/infrastructure-tests.yml Co-authored-by: mimartin12 <77340197+mimartin12@users.noreply.github.com> --------- Co-authored-by: mimartin12 <77340197+mimartin12@users.noreply.github.com>
This commit is contained in:
@ -16,7 +16,7 @@ public class OrganizationUserRepositoryTests
|
||||
var user = await userRepository.CreateAsync(new User
|
||||
{
|
||||
Name = "Test User",
|
||||
Email = "test@email.com",
|
||||
Email = $"test+{Guid.NewGuid()}@email.com",
|
||||
ApiKey = "TEST",
|
||||
SecurityStamp = "stamp",
|
||||
});
|
||||
@ -24,6 +24,8 @@ public class OrganizationUserRepositoryTests
|
||||
var organization = await organizationRepository.CreateAsync(new Organization
|
||||
{
|
||||
Name = "Test Org",
|
||||
BillingEmail = user.Email, // TODO: EF does not enfore this being NOT NULL
|
||||
Plan = "Test", // TODO: EF does not enforce this being NOT NULl
|
||||
});
|
||||
|
||||
var orgUser = await organizationUserRepository.CreateAsync(new OrganizationUser
|
||||
@ -50,7 +52,7 @@ public class OrganizationUserRepositoryTests
|
||||
var user1 = await userRepository.CreateAsync(new User
|
||||
{
|
||||
Name = "Test User 1",
|
||||
Email = "test1@email.com",
|
||||
Email = $"test+{Guid.NewGuid()}@email.com",
|
||||
ApiKey = "TEST",
|
||||
SecurityStamp = "stamp",
|
||||
});
|
||||
@ -58,7 +60,7 @@ public class OrganizationUserRepositoryTests
|
||||
var user2 = await userRepository.CreateAsync(new User
|
||||
{
|
||||
Name = "Test User 2",
|
||||
Email = "test1@email.com",
|
||||
Email = $"test+{Guid.NewGuid()}@email.com",
|
||||
ApiKey = "TEST",
|
||||
SecurityStamp = "stamp",
|
||||
});
|
||||
@ -66,18 +68,22 @@ public class OrganizationUserRepositoryTests
|
||||
var organization = await organizationRepository.CreateAsync(new Organization
|
||||
{
|
||||
Name = "Test Org",
|
||||
BillingEmail = user1.Email, // TODO: EF does not enforce this being NOT NULl
|
||||
Plan = "Test", // TODO: EF does not enforce this being NOT NULl
|
||||
});
|
||||
|
||||
var orgUser1 = await organizationUserRepository.CreateAsync(new OrganizationUser
|
||||
{
|
||||
OrganizationId = organization.Id,
|
||||
UserId = user1.Id,
|
||||
Status = OrganizationUserStatusType.Confirmed,
|
||||
});
|
||||
|
||||
var orgUser2 = await organizationUserRepository.CreateAsync(new OrganizationUser
|
||||
{
|
||||
OrganizationId = organization.Id,
|
||||
UserId = user2.Id,
|
||||
Status = OrganizationUserStatusType.Confirmed,
|
||||
});
|
||||
|
||||
helper.ClearTracker();
|
||||
|
Reference in New Issue
Block a user