mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 08:32:50 -05:00
[SM-394] Secrets Manager (#2164)
Long lived feature branch for Secrets Manager Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Co-authored-by: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> Co-authored-by: CarleyDiaz-Bitwarden <103955722+CarleyDiaz-Bitwarden@users.noreply.github.com> Co-authored-by: Thomas Avery <tavery@bitwarden.com> Co-authored-by: Colton Hurst <colton@coltonhurst.com>
This commit is contained in:
22
test/Core.Test/AutoFixture/ProjectFixtures.cs
Normal file
22
test/Core.Test/AutoFixture/ProjectFixtures.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using AutoFixture;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Test.Common.AutoFixture.Attributes;
|
||||
|
||||
namespace Bit.Core.Test.AutoFixture.ProjectsFixture;
|
||||
|
||||
public class ProjectCustomization : ICustomization
|
||||
{
|
||||
public void Customize(IFixture fixture)
|
||||
{
|
||||
var projectId = Guid.NewGuid();
|
||||
|
||||
fixture.Customize<Project>(composer => composer
|
||||
.With(p => p.Id, projectId)
|
||||
.Without(s => s.Secrets));
|
||||
}
|
||||
}
|
||||
|
||||
public class ProjectCustomizeAttribute : BitCustomizeAttribute
|
||||
{
|
||||
public override ICustomization GetCustomization() => new ProjectCustomization();
|
||||
}
|
22
test/Core.Test/AutoFixture/SecretFixtures.cs
Normal file
22
test/Core.Test/AutoFixture/SecretFixtures.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using AutoFixture;
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Test.Common.AutoFixture.Attributes;
|
||||
|
||||
namespace Bit.Core.Test.AutoFixture.SecretsFixture;
|
||||
|
||||
public class SecretCustomization : ICustomization
|
||||
{
|
||||
public void Customize(IFixture fixture)
|
||||
{
|
||||
var secretId = Guid.NewGuid();
|
||||
|
||||
fixture.Customize<Secret>(composer => composer
|
||||
.With(o => o.Id, secretId)
|
||||
.Without(s => s.Projects));
|
||||
}
|
||||
}
|
||||
|
||||
public class SecretCustomizeAttribute : BitCustomizeAttribute
|
||||
{
|
||||
public override ICustomization GetCustomization() => new SecretCustomization();
|
||||
}
|
Reference in New Issue
Block a user