Skip to content

Commit

Permalink
Creation of test users fails due to minimum password length (#926)
Browse files Browse the repository at this point in the history
* test: reference all projects from ArchUnit tests

* chore: set length of passwords of test users to 10
  • Loading branch information
tnotheis authored Oct 28, 2024
1 parent f8ed305 commit 3b73579
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Backbone.DatabaseMigrator.Tests;

public class MigrationReaderTests
public class MigrationReaderTests : AbstractTestsBase
{
[Fact]
public async Task Returns_migrations_in_correct_order()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates;
using Backbone.Modules.Relationships.Infrastructure.Persistence.Database;
using Backbone.Tooling;
using Backbone.UnitTestTools.Data;
using Backbone.UnitTestTools.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -17,7 +16,7 @@

namespace Backbone.Job.IdentityDeletion.Tests.Integration;

public class ActualDeletionWorkerTests
public class ActualDeletionWorkerTests : AbstractTestsBase
{
private readonly IHost _host;

Expand Down
16 changes: 16 additions & 0 deletions Backbone.Tests.ArchUnit/Backbone.Tests.ArchUnit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Applications\AdminApi\src\AdminApi.Infrastructure.Database.Postgres\AdminApi.Infrastructure.Database.Postgres.csproj" />
<ProjectReference Include="..\Applications\AdminApi\src\AdminApi.Infrastructure.Database.SqlServer\AdminApi.Infrastructure.Database.SqlServer.csproj" />
<ProjectReference Include="..\Applications\AdminApi\src\AdminApi.Infrastructure\AdminApi.Infrastructure.csproj" />
<ProjectReference Include="..\Applications\AdminApi\src\AdminApi\AdminApi.csproj" />
<ProjectReference Include="..\Applications\AdminCli\src\AdminCli\AdminCli.csproj" />
<ProjectReference Include="..\Applications\DatabaseMigrator\src\DatabaseMigrator\DatabaseMigrator.csproj" />
<ProjectReference Include="..\Applications\DatabaseMigrator\test\DatabaseMigrator.Tests\DatabaseMigrator.Tests.csproj" />
<ProjectReference Include="..\Applications\HealthCheck\src\HealthCheck.csproj" />
<ProjectReference Include="..\Applications\IdentityDeletionJobs\test\Job.IdentityDeletion.Tests.Integration\Job.IdentityDeletion.Tests.Integration.csproj" />
<ProjectReference Include="..\Applications\SseServer\src\SseServer\SseServer.csproj" />
<ProjectReference Include="..\Applications\SseServer\test\SseServerTests\SseServerTests.csproj" />
<ProjectReference Include="..\BuildingBlocks\src\BuildingBlocks.SDK\BuildingBlocks.SDK.csproj" />
<ProjectReference Include="..\BuildingBlocks\src\UnitTestTools\UnitTestTools.csproj" />
<ProjectReference Include="..\BuildingBlocks\test\BuildingBlocks.Application.Tests\BuildingBlocks.Application.Tests.csproj" />
<ProjectReference Include="..\BuildingBlocks\test\BuildingBlocks.Infrastructure.Tests\BuildingBlocks.Infrastructure.Tests.csproj" />
Expand All @@ -30,12 +42,15 @@
<ProjectReference Include="..\Applications\ConsumerApi\src\ConsumerApi.csproj" />
<ProjectReference Include="..\Applications\EventHandlerService\test\EventHandlerService.Tests\EventHandlerService.Tests.csproj" />
<ProjectReference Include="..\Applications\IdentityDeletionJobs\test\Job.IdentityDeletion.Tests\Job.IdentityDeletion.Tests.csproj" />
<ProjectReference Include="..\Modules\Challenges\src\Challenges.Jobs.Cleanup\Challenges.Jobs.Cleanup.csproj" />
<ProjectReference Include="..\Modules\Challenges\test\Challenges.Application.Tests\Challenges.Application.Tests.csproj" />
<ProjectReference Include="..\Modules\Devices\test\Devices.Application.Tests\Devices.Application.Tests.csproj" />
<ProjectReference Include="..\Modules\Devices\test\Devices.Domain.Tests\Devices.Domain.Tests.csproj" />
<ProjectReference Include="..\Modules\Devices\test\Devices.Infrastructure.Tests\Devices.Infrastructure.Tests.csproj" />
<ProjectReference Include="..\Modules\Files\test\Files.Application.Tests\Files.Application.Tests.csproj" />
<ProjectReference Include="..\Modules\Files\test\Files.Infrastructure.Tests\Files.Infrastructure.Tests.csproj" />
<ProjectReference Include="..\Applications\FilesSanityCheck\test\Files.Jobs.SanityCheck.Tests\FilesSanityCheck.Tests.csproj" />
<ProjectReference Include="..\Modules\Messages\src\Messages.Common\Messages.Common.csproj" />
<ProjectReference Include="..\Modules\Messages\test\Messages.Application.Tests\Messages.Application.Tests.csproj" />
<ProjectReference Include="..\Modules\Messages\test\Messages.Domain.Tests\Messages.Domain.Tests.csproj" />
<ProjectReference Include="..\Modules\Quotas\test\Quotas.Application.Tests\Quotas.Application.Tests.csproj" />
Expand All @@ -44,5 +59,6 @@
<ProjectReference Include="..\Modules\Synchronization\test\Synchronization.Application.Tests\Synchronization.Application.Tests.csproj" />
<ProjectReference Include="..\Modules\Synchronization\test\Synchronization.Domain.Tests\Synchronization.Domain.Tests.csproj" />
<ProjectReference Include="..\Modules\Tokens\test\Tokens.Application.Tests\Tokens.Application.Tests.csproj" />
<ProjectReference Include="..\Modules\Tokens\test\Tokens.Domain.Tests\Tokens.Domain.Tests.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public async Task Handle(SeedTestUsersCommand request, CancellationToken cancell
var identityA = Identity.CreateTestIdentity(IdentityAddress.Create([1, 1, 1, 1, 1], _applicationOptions.DidDomainName), [1, 1, 1, 1, 1], basicTier!.Id, "USRa");
var identityB = Identity.CreateTestIdentity(IdentityAddress.Create([2, 2, 2, 2, 2], _applicationOptions.DidDomainName), [2, 2, 2, 2, 2], basicTier.Id, "USRb");

await _identitiesRepository.Add(identityA, "a");
await _identitiesRepository.Add(identityB, "b");
await _identitiesRepository.Add(identityA, "aaaaaaaaaa");
await _identitiesRepository.Add(identityB, "bbbbbbbbbb");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Backbone.Modules.Tokens.Domain.Tests.Tests;

public class TokenCanBeCollectedUsingPasswordTests
public class TokenCanBeCollectedUsingPasswordTests : AbstractTestsBase
{
[Fact]
public void Can_collect_without_a_password_when_no_password_is_defined()
Expand Down

0 comments on commit 3b73579

Please sign in to comment.