Skip to content

Дубова Ксения Лаб. 3 Группа 6511#143

Open
kseniaDubova wants to merge 13 commits into
itsecd:mainfrom
kseniaDubova:main
Open

Дубова Ксения Лаб. 3 Группа 6511#143
kseniaDubova wants to merge 13 commits into
itsecd:mainfrom
kseniaDubova:main

Conversation

@kseniaDubova
Copy link
Copy Markdown

ФИО: Дубова Ксения Олеговна
Номер группы: 6511
Номер лабораторной: 3
Номер варианта: 5
Краткое описание предметной области: Сотрудник компании
Краткое описание добавленных фич: Интеграционное тестирование + хранилище

@github-actions github-actions Bot added In progress Код в процессе проверки Lab 3 Лабораторная №3. Интеграционное тестирование labels May 12, 2026
@github-actions github-actions Bot requested a review from danlla May 12, 2026 16:47
@kseniaDubova
Copy link
Copy Markdown
Author

Тесты проходят только через отладку без точек останова, коллеги сказали, что у них так же...

var api = builder.AddProject<Projects.CompanyEmployee_ApiGateway>("companyemployee-apigateway")
.WithHttpEndpoint(name: "gateway", port: 5212);

var minio = builder.AddContainer("minio","minio/minio")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Лучше использовать пакет CommunityToolkit.Aspire.Hosting.Minio, так как он автоматом сам подключит трассировку и прочий мониторинг

.WithEnvironment("MINIO_ROOT_PASSWORD", "minioadmin")
.WithArgs("server", "/data", "--console-address", ":9001");

var rabbitmq = builder.AddRabbitMQ("rabbitmq");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

В 5 варианте в виде брокера должен быть SNS, а не RabbitMQ

.WithExternalHttpEndpoints();

builder.Build().Run();
//public partial class Program; No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Странный и ненужный коммент


public class MinioService
{
private readonly IConfiguration _configuration;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Это поле нигде не используется

return [];
}

public async Task DisposeAsync(){}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Здесь нужно выполнить Dispose сервисов, которые этого требуют

Comment on lines +29 to +31
HttpResponseMessage? response = null;

response = await client.GetAsync("/api/CompanyEmployee?id=1");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Зачем это делать в 2 строки?

var response = await client.GetAsync("/api/CompanyEmployee?id=1");

Comment on lines +14 to +17
public IntegrationTests(Fixture fixture)
{
_fixture = fixture;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Можно использовать primary constructor

builder.AddServiceDefaults();
builder.AddRedisDistributedCache("redis");

builder.Services.AddMassTransit(x =>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Вообще если не ошибаюсь, на лекциях должно было говориться, что использовать MassTransit плохо и есть примеры как делать лучше

Copy link
Copy Markdown

@danlla danlla May 14, 2026

Choose a reason for hiding this comment

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

Тесты проходят только через отладку без точек останова, коллеги сказали, что у них так же...

Думаю проблема в фикстуре и если правильно ее настроить, то все будет нормально работать

Но так как я уже принял несколько лаб с похожей фикстурой (и похожими тестами к слову), то и тут меня устроит, что тесты работают хотя бы в отладке, хотя конечно же это не совсем корректно

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