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

Assorted e2e test updates #453

Merged
merged 3 commits into from
Jan 23, 2024
Merged

Conversation

r-c-n
Copy link

@r-c-n r-c-n commented Jan 10, 2024

  • Fix pipeline test (sync it to Node model changes)
  • The "test" service of test-docker-compose.yaml no longer launches the tests on startup. Update the run_e2e_tests.sh script to start the service and run the tests.
  • Fix inconsistencies in pytest dependencies

@r-c-n r-c-n requested a review from JenySadadia January 10, 2024 15:58
Copy link
Collaborator

@JenySadadia JenySadadia left a comment

Choose a reason for hiding this comment

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

Failing locally:

WARNING: Cannot resolve the dependency marker 'e2e_tests/test_user_creation.py::test_create_regular_user' - ignoring it.
WARNING: Cannot resolve the dependency marker 'e2e_tests/test_subscribe_handler.py::test_subscribe_node_channel' - ignoring it.
WARNING: Cannot resolve the dependency marker 'e2e_tests/test_subscribe_handler.py::test_subscribe_test_channel' - ignoring it.

@JenySadadia
Copy link
Collaborator

One solution is to mount tests/e2e_tests directly in test-docker-compose.yaml.

- './tests/e2e_tests:/home/kernelci/e2e_tests'

Another solution is to update all the dependecy markers to use test/e2e_tests/* instead of e2e_tests/*

@pytest.mark.dependency(
    depends=['tests/e2e_tests/test_user_creation.py::test_create_regular_user'],
    scope='session')

I think the first one looks easier than updating all the tests.

@r-c-n r-c-n force-pushed the fix_run_e2e_tests branch from 4002678 to 265c44a Compare January 22, 2024 10:06
@r-c-n r-c-n force-pushed the fix_run_e2e_tests branch from 265c44a to 68b6d69 Compare January 22, 2024 10:14
@r-c-n r-c-n changed the title [trivial] run_e2e_tests: update script after test-docker-compose changes Assorted e2e test updates Jan 22, 2024
@r-c-n
Copy link
Author

r-c-n commented Jan 22, 2024

One solution is to mount tests/e2e_tests directly in test-docker-compose.yaml.

- './tests/e2e_tests:/home/kernelci/e2e_tests'

Another solution is to update all the dependecy markers to use test/e2e_tests/* instead of e2e_tests/*

@pytest.mark.dependency(
    depends=['tests/e2e_tests/test_user_creation.py::test_create_regular_user'],
    scope='session')

I think the first one looks easier than updating all the tests.

The first solution didn't work, but I don't understand why. pytest only raises these warnings for some dependency headers but not for others, totally inconsistent. I ended up fixing all the dependency paths, that's the only thing that worked.

I also added a fix for the pipeline test (model-related) that I didn't catch earlier because that test was being skipped.

@r-c-n r-c-n force-pushed the fix_run_e2e_tests branch from 68b6d69 to d5a30e6 Compare January 22, 2024 12:17
Copy link
Collaborator

@JenySadadia JenySadadia left a comment

Choose a reason for hiding this comment

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

Tested OK.

@JenySadadia JenySadadia added this pull request to the merge queue Jan 23, 2024
Merged via the queue into kernelci:main with commit c346f69 Jan 23, 2024
4 checks passed
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