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

Adopt tempesta-tech.com in LXC container test #602

Merged
merged 19 commits into from
Jun 20, 2024
Merged

Conversation

mbabitski-t
Copy link
Contributor

@mbabitski-t mbabitski-t commented Mar 29, 2024

This PR resolves #507

  • add LXC backend for container testing
  • automatic LXC proxy setup and teardown
  • backend can optionally make a pre-test snapshot and restore the container to it's previous stage
  • spin up a staging site container of tempesta-tech.com
  • test the site with common interaction flow: get the main page, fetch list of blog posts, login as admin, create a blog post, check that the post exists, login as user, add a comment, login as admin, approve the comment and check that it appeared on the blog post page.

@RomanBelozerov RomanBelozerov force-pushed the mb-507-lxc branch 2 times, most recently from 90d007e to e3236f8 Compare May 6, 2024 12:35
@RomanBelozerov RomanBelozerov marked this pull request as ready for review May 9, 2024 09:20
Copy link
Contributor

@const-t const-t left a comment

Choose a reason for hiding this comment

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

Should we test how caching works with WP? For instance, add comment to blog post and check if it was added and post was updated. And edit blog post from admin panel then check that changes applied to post and users can see them.

setup.sh Show resolved Hide resolved
setup.sh Outdated Show resolved Hide resolved
t_sites/test_tempesta_tech.py Outdated Show resolved Hide resolved
Copy link
Contributor

@krizhanovsky krizhanovsky left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@krizhanovsky krizhanovsky left a comment

Choose a reason for hiding this comment

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

Just a couple of comments on the caching behavior.

t_sites/test_tempesta_tech.py Show resolved Hide resolved
t_sites/test_tempesta_tech.py Show resolved Hide resolved
t_stress/test_wordpress.py Outdated Show resolved Hide resolved
Copy link
Contributor

@krizhanovsky krizhanovsky left a comment

Choose a reason for hiding this comment

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

LGTM

- add a new post page;
- add a new comment to this page;
- update cache;
- cache the comment is present on this page;
@RomanBelozerov RomanBelozerov merged commit b7351d0 into master Jun 20, 2024
1 check failed
@RomanBelozerov RomanBelozerov deleted the mb-507-lxc branch June 20, 2024 07:20
enuribekov-tempesta pushed a commit that referenced this pull request Jul 3, 2024
* Add LXC testing backend

* Add LXC container healthcheck

* Remove unused variables

* Remove reference to another branch

* Add LXC server factory

* Remove unused code

* LXC pretest snapshot

* Semi-working site test

* rework LXCServer:
- subprocess changed to `node.run_cmd`;
- the waiting moved from run_start to wait_for_connection;
- removed all optional functions for this class. They are not necessary, but it makes the code more difficult. We don't plan to create other containers or multiple ports.

* fix and add tests for tempesta-tech with LXCServer, update default test configs

* remove docker and tests using docker.

* add tempesta-tech as git submodule

* remove docker-compose backend, update README.

* typo fix and update tests_disabled_* files

* change link for tempesta-tech module to `https` because currently CI uses creds with login/password

* change IP for `cache_purge_acl` because by default the client IP in test framework is 127.0.0.2

* add test case
- add a new post page;
- add a new comment to this page;
- update cache;
- cache the comment is present on this page;

* fix setup.sh

* typo fix and update comment

---------

Co-authored-by: Roman <rb@tempesta-tech.com>
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.

Adopt tempesta-tech.com in LXC container test
5 participants