Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавить поддержку макроса #[picotest_unit] #3

Open
alrsorokin opened this issue Feb 24, 2025 · 1 comment · May be fixed by #18
Open

Добавить поддержку макроса #[picotest_unit] #3

alrsorokin opened this issue Feb 24, 2025 · 1 comment · May be fixed by #18
Assignees

Comments

@alrsorokin
Copy link
Collaborator

сейчас нет возможности запускать юнит на какие то части, которые используют пикодату

как сейчас работает picotest?

  • происходит поднятие кластера с установкой плагина
  • тесты запускаются "рядом", что позволяет подергать кластер только за http ручки

как переделать?
нам нужен плагин для тестирования плагинов
библиотека picotest должна регистрировать все picotest функции и модули и скормить тестирующему плагину (как пока вопрос)
как я это представляю:

  • вызов cargo test
  • picotest собирает тесты в модуль
  • picotest поднимает кластер 1 раз
  • встраивает в кластер плагин с торчащей ручкой run_tests
  • плагин прогоняет на on_start тесты
@boris-sinyapkin
Copy link
Contributor

Решили использовать отдельный макрос для юнит тестов #[picotest_unit]:

#[picotest_unit]
fn test_mytest() {}

Данный макрос будет оборачивать тест в extern "C" и вызывается из lua рантайма пикодаты через FFI:

@boris-sinyapkin boris-sinyapkin changed the title подумать над запуском тестов изнутри picodata Добавить поддержку макроса #[picotest_unit] Mar 11, 2025
@boris-sinyapkin boris-sinyapkin self-assigned this Mar 11, 2025
boris-sinyapkin pushed a commit that referenced this issue Mar 14, 2025
This change introduce initial support of unit-testing environment in picotest.

Closes #3
boris-sinyapkin pushed a commit that referenced this issue Mar 14, 2025
This change introduce initial support of unit-testing environment in picotest.

Closes #3
boris-sinyapkin pushed a commit that referenced this issue Mar 14, 2025
This change introduce initial support of unit-testing environment in picotest.

Closes #3
boris-sinyapkin pushed a commit that referenced this issue Mar 14, 2025
This change introduce initial support of unit-testing environment in picotest.

Closes #3
boris-sinyapkin pushed a commit that referenced this issue Mar 14, 2025
This change introduce initial support of unit-testing environment in picotest.

Closes #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants