forked from ddrilling/AsbCloudServer
Фиксы
1. Удалён лишний тест. В данном тесте никогда не возникнет BadRequest. Если идентификатор скважины не валиден у нас возникнет Forbidden. 2. Сделал коллекцию прав потокобезопасной, чтобы не возникало состояние RaiseCondition
This commit is contained in:
parent
8f29a9178b
commit
0b9fd49039
@ -151,20 +151,6 @@ public class ProcessMapPlanDrillingControllerTest: BaseIntegrationTest
|
||||
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task InsertRange_returns_BadRequest_for_IdWell()
|
||||
{
|
||||
//arrange
|
||||
var badDto = dto.Adapt<ProcessMapPlanDrillingDto>();
|
||||
badDto.IdWell = int.MaxValue;
|
||||
|
||||
//act
|
||||
var response = await client.InsertRange(dto.IdWell, new[] { badDto });
|
||||
|
||||
//assert
|
||||
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ClearAndInsertRange_returns_success()
|
||||
{
|
||||
|
@ -1,13 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace AsbCloudWebApi
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
|
||||
public class PermissionAttribute : Attribute
|
||||
{
|
||||
public static SortedSet<string> Registered { get; } = new SortedSet<string>();
|
||||
public static ConcurrentBag<string> Registered { get; } = new();
|
||||
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user