Skip to content

Commit

Permalink
tests: fix unit tests
Browse files Browse the repository at this point in the history
Refs: #1021
  • Loading branch information
Phil91 committed Sep 24, 2024
1 parent f9a8d73 commit 434f132
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Check Format
run: dotnet format src --verify-no-changes --no-restore
- name: Test
run: dotnet test src --filter FullyQualifiedName\!~Org.Eclipse.TractusX.Portal.Backend.EndToEnd.Tests --no-restore --verbosity normal
run: dotnet test src --no-build --filter FullyQualifiedName\!~Org.Eclipse.TractusX.Portal.Backend.EndToEnd.Tests --no-restore --verbosity normal

checkFramework:
name: Check nuget packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5025,7 +5025,7 @@ paths:
post:
tags:
- User
summary: Create new users for the companies shared identityprovider by upload of csv-file (Authorization required)
summary: 'Create new users for the companies shared identityprovider by upload of csv-file (Authorization required - Roles: add_user_account)'
description: 'Example: POST: api/administration/user/owncompany/usersfile'
requestBody:
content:
Expand Down Expand Up @@ -6348,6 +6348,8 @@ components:
nullable: true
name:
type: string
userType:
$ref: '#/components/schemas/CompanyServiceAccountKindId'
serviceAccountType:
$ref: '#/components/schemas/CompanyServiceAccountTypeId'
status:
Expand Down Expand Up @@ -7767,6 +7769,11 @@ components:
roleName:
type: string
additionalProperties: false
UserRoleType:
enum:
- Internal
- External
type: string
UserRoleWithDescription:
type: object
properties:
Expand All @@ -7778,6 +7785,8 @@ components:
roleDescription:
type: string
nullable: true
roleType:
$ref: '#/components/schemas/UserRoleType'
additionalProperties: false
UserRoleWithId:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Models.Validation;

namespace Org.Eclipse.TractusX.Portal.Backend.Provisioning.Library;

Expand All @@ -43,7 +44,7 @@ public static IServiceCollection ConfigureProvisioningSettings(
services.Configure<ProvisioningSettings>(x =>
{
section.Bind(x);
if (string.IsNullOrWhiteSpace(x.CentralRealm))
if (!EnvironmentExtensions.SkipValidation() && string.IsNullOrWhiteSpace(x.CentralRealm))
{
throw new ConfigurationException($"{nameof(ProvisioningSettings)}: {nameof(x.CentralRealm)} must not be null or empty");
}
Expand Down

0 comments on commit 434f132

Please sign in to comment.