Skip to content

Елагин Денис 6513 Лаб. 3#110

Open
Donistr wants to merge 37 commits intoitsecd:mainfrom
Donistr:main
Open

Елагин Денис 6513 Лаб. 3#110
Donistr wants to merge 37 commits intoitsecd:mainfrom
Donistr:main

Conversation

@Donistr
Copy link
Copy Markdown

@Donistr Donistr commented Apr 14, 2026

ФИО: Елагин Денис
Номер группы: 6513
Номер лабораторной: 3
Номер варианта: 38
Краткое описание предметной области: Объект жилого строительства
Краткое описание добавленных фич: добавил s3 хранилище и брокер по варианту, изменил генератор так, чтобы там е, где происходит кэширование происходила отправка в брокер, сервис работы с файлами получает сообщения из брокера и сохраняет в s3 хранилище, также сделаны интеграционные тесты

@github-actions github-actions bot added In progress Код в процессе проверки Lab 3 Лабораторная №3. Интеграционное тестирование labels Apr 14, 2026
@github-actions github-actions bot requested a review from alxmcs April 14, 2026 16:48
using System.Text;
using System.Text.Json.Nodes;

namespace ResidentialBuilding.EventSink.Controller;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Неймспейс не соответствует директории, в которой лежит исходник

using ResidentialBuilding.EventSink.Service.Storage;
using System.Text;

namespace ResidentialBuilding.EventSink.Controller;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И тут тоже

}

logger.LogInformation("Subscription was successfully confirmed.");
return Ok();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот этот return Ok(); я бы, наверное, заменил на break;

logger.LogError(ex, "Exception occurred while processing SNS notifications.");
}

return Ok();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Потому что тут есть return Ok();

Comment on lines +14 to +15
?? throw new KeyNotFoundException(
"S3 bucket name was not found in configuration");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это ReSharper в Rider-е предлагает так переносить строки? JetBrains с каждым релизом все дальше от бога 😢

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да, это ide так переносит, с форматированием у них в этой ide почему-то беда


namespace ResidentialBuilding.EventSink.Service.Storage;

public class AwsFileService(IAmazonS3 client, IConfiguration configuration, ILogger<AwsFileService> logger)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не хватает саммари

@@ -0,0 +1,9 @@
namespace ResidentialBuilding.EventSink.Service.Messaging;
Copy link
Copy Markdown
Collaborator

@alxmcs alxmcs Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Похоже, что проблема с неймспейсами у тебя по всему проекту, потому что проект раньше назывался по-другому

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если честно, я не вижу разницы между первыми тремя юнит-тестами с точки зрения проверки работоспособности пайплайна обработки.
Все они выстроены одинаково - поднимается оркестратор, отправляется запрос в гейтвей, через период времени запрашивается файловый сервис, его ответ ассертится.

При этом некоторый краевой случай -проверка, что запрос по одному идентификатору вернет одни и те же данные- рассматривается только в тесте номер 3.

Я бы порекомендовал лучше покрыть тестами негативный сценарий - ведь у тебя в коде происходит валидация id

@Donistr Donistr requested a review from alxmcs April 16, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In progress Код в процессе проверки Lab 3 Лабораторная №3. Интеграционное тестирование

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants