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

Run more tests via Pants + pytest #6202

Closed
wants to merge 98 commits into from
Closed

Run more tests via Pants + pytest #6202

wants to merge 98 commits into from

Conversation

cognifloyd
Copy link
Member

No description provided.

@cognifloyd cognifloyd added this to the pants milestone May 22, 2024
@cognifloyd cognifloyd self-assigned this May 22, 2024
@pull-request-size pull-request-size bot added the size/S PR that changes 10-29 lines. Very easy to review. label May 22, 2024
@pull-request-size pull-request-size bot added size/L PR that changes 100-499 lines. Requires some effort to review. size/XL PR that changes 500-999 lines. Consider splitting work into several ones that easier to review. size/XXL PR that changes 1000+ lines. You should absolutely split your PR into several. and removed size/S PR that changes 10-29 lines. Very easy to review. size/L PR that changes 100-499 lines. Requires some effort to review. size/XL PR that changes 500-999 lines. Consider splitting work into several ones that easier to review. labels May 24, 2024
@cognifloyd cognifloyd force-pushed the pants-test branch 3 times, most recently from 2460985 to 4fb12a2 Compare September 12, 2024 18:25
Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  pantsbuild-pants               2.22.0       -->   2.23.0a0
  pantsbuild-pants-testutil      2.22.0       -->   2.23.0a0
  pex                            2.3.1        -->   2.16.2
  typing-extensions              4.3.0        -->   4.12.2

==                      Added dependencies                      ==

  libcst                         1.4.0
It is now a per-resolve option:
[export].py_non_hermetic_scripts_in_resolve = ["st2"]
First, add metadata so pants can load the packs base path fixtures
from st2common/resources for the content laoder tests.
Second, add a fixture.py file in each base path, similar to the
fixtures we have in st2tests, so that pants dependency inferrence
can see where these fixtures are used.
Third, the fixture file ended up creating a __pycache__ directory
in the packs base paths which made tests fail due to an unexpected
extra "pack" named "__pycache__". So, I excluded that as a valid
pack name.
First, add metadata so pants can load the conf fixture from
st2common/tests/resources for the logger test.

Second, add a fixture.py file, similar to the fixtures we have in
st2tests, so that pants dependency inferrence can see where these
fixtures are used.
First, add metadata so pants can load the loadableplugin fixture
from st2common/tests/resources for the plugin loader test.

Second, add a fixture.py file, similar to the fixtures we have in
st2tests, so that pants dependency inferrence can see where these
fixtures are used.
I could change fetch-depth, but that would change it for
both submodules and for the st2.git checkout.
@cognifloyd
Copy link
Member Author

Hooray! With these changes, pants can run all unit and pack tests.

Integration tests will require more thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure: ci/cd no changelog No Changelog.rst needed for this PR pantsbuild size/XXL PR that changes 1000+ lines. You should absolutely split your PR into several. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant