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

e2e-tests: Add end-to-end test script and docker compose app #359

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

detsch
Copy link
Member

@detsch detsch commented Oct 7, 2024

Preliminar PR to facilitate discussion.

@mike-sul you can run the tests using:

export FACTORY=detsch-aklite-test
export USER_TOKEN=<your_fio_token>
./dev-shell-e2e-test.sh python -m pytest e2e-test.py -v

On the first run, the device will be registered automatically.

There are some easy improvements to be done in the test script, but my next step is to try and run it as a github action.

My idea is to increase the tests combinations, perhaps having a "fast" mode that runs in github, with no more than 50 update operations, and a slower mode that goes through some unusual update sequences and variations on the apps configuration, increasing the chances to hit some new unexpected situation.

The targets in the factory where created almost automatically, but copying some applications I already had. We can re-create them as needed, but the current concept is to keep using always the same set of targets, until we believe that we need different ones.

@detsch detsch requested a review from mike-sul October 7, 2024 23:30
@detsch detsch force-pushed the detsch-e2e-test branch 2 times, most recently from 8872c6a to d9c00f6 Compare October 14, 2024 20:19
@detsch detsch force-pushed the detsch-e2e-test branch 3 times, most recently from 60a4681 to 939bd5a Compare October 15, 2024 20:10
Run `make -f dev-flow.mk` to build the aktualizr-lite client.

##### Configure your development device
You can add additional configuration `*.toml` snippets to the default device configuration by placing them in `<sota-project-home-dir>/.device/etc.sota`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be useful to add an example. Something like:

cat <sota-project-home-dir>/.device/etc.sota/z-90-apps.toml

[pacman]
compose_apps="myapp"

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
@detsch detsch changed the title [WIP] tests: Add end-to-end test script and docker compose app e2e-tests: Add end-to-end test script and docker compose app Oct 16, 2024
@detsch detsch marked this pull request as ready for review October 16, 2024 18:20
@detsch detsch force-pushed the detsch-e2e-test branch 2 times, most recently from 9cc14d8 to 3ef6241 Compare October 17, 2024 18:08
This includes docker compose app and container based on the one
available in the sotactl project.

Environment allows registration and updates of a pseudo device,
communication with an actual backend.

Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
The script contains a series of tests based on real targets available at
a specific test factory.

Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
It uses the following GitHub secrets:
- E2E_TEST_FACTORY
- E2E_TEST_BASE_TARGET_VERSION
- E2E_TEST_USER_TOKEN

Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
Code based on sotactl Makefile.

Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
Based on sotactl README.md.

Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
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 this pull request may close these issues.

2 participants