test.describe('ClickHouse - UAM', () => {
  let agentUbuntu: AgentList;
  let agentNanoPC: AgentList;

  test.beforeAll(async () => {
    agentUbuntu = agentService.filterAgent(await storageHelper.getAgentList(), OsName.Ubuntu, OsVersion.Ubuntu_22_04)[0];
    agentNanoPC = agentService.filterAgent(await storageHelper.getAgentList(), AgentName.NanoPC)[0];
  });

  test.afterAll(async () => {
    await Promise.all([deleteAccounts(agentUbuntu), deleteAccounts(agentNanoPC)]);
  });

  test(`UAM (${Action.CreateUser}) @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentUbuntu, action: Action.CreateUser, eventId: EventId.CreateUserUAM, cmd: Cmd.Useradd });
  });

  test(`UAM (${Action.DeleteUser}) @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentUbuntu, action: Action.DeleteUser, eventId: EventId.DeleteUserUAM, cmd: Cmd.Userdel });
  });

  test(`UAM (${Action.LockUser}) @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentUbuntu, action: Action.LockUser, eventId: EventId.LockUserUAM, cmd: Cmd.Usermod });
  });

  test(`UAM (${Action.PasswordUser}) @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentUbuntu, action: Action.PasswordUser, eventId: EventId.PasswdUserUAM, cmd: Cmd.Passwd });
  });

  test(`UAM (${Action.UnlockUser}) @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentUbuntu, action: Action.UnlockUser, eventId: EventId.UnlockUserUAM, cmd: Cmd.Usermod });
  });

  test(`UAM (${Action.CreateUser}) ${AgentName.NanoPC} @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentNanoPC, action: Action.CreateUser, eventId: EventId.CreateUserUAM, cmd: Cmd.Useradd });
  });

  test(`UAM (${Action.DeleteUser}) ${AgentName.NanoPC} @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentNanoPC, action: Action.DeleteUser, eventId: EventId.DeleteUserUAM, cmd: Cmd.Userdel });
  });

  test(`UAM (${Action.LockUser}) ${AgentName.NanoPC} @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentNanoPC, action: Action.LockUser, eventId: EventId.LockUserUAM, cmd: Cmd.Usermod });
  });

  test(`UAM (${Action.PasswordUser}) ${AgentName.NanoPC} @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentNanoPC, action: Action.PasswordUser, eventId: EventId.PasswdUserUAM, cmd: Cmd.Passwd });
  });

  test(`UAM (${Action.UnlockUser}) ${AgentName.NanoPC} @${OsName.Ubuntu} ${OsVersion.Ubuntu_22_04}`, async () => {
    allure.suite(OsName.Ubuntu);
    await runUAMTest({ agent: agentNanoPC, action: Action.UnlockUser, eventId: EventId.UnlockUserUAM, cmd: Cmd.Usermod });
  });
});

правильно ли я сделал Promise.all или нет?