|
1 | | -"""Tests for vcspull._internal.remotes.gitlab module.""" |
| 1 | +"""Tests for vcspull._internal.remotes.gitlab module. |
| 2 | +
|
| 3 | +Live fixture catalogue (gitlab.com) |
| 4 | +------------------------------------ |
| 5 | +The live smoke tests target real repos on gitlab.com. If any fixture is |
| 6 | +deleted, use this section to know what to recreate and what each piece tests. |
| 7 | +
|
| 8 | +Groups (must exist) |
| 9 | +~~~~~~~~~~~~~~~~~~~ |
| 10 | +vcs-python-group-test |
| 11 | + Top-level group. Tests org mode and top-level ``with_shared``. |
| 12 | +vcs-python-group-test/vcs-python-subgroup-test |
| 13 | + Subgroup at depth 1. Tests ``--skip-group`` at segment depth 1. |
| 14 | +vcs-python-group-test/vcs-python-subgroup-test/vcs-python-subsubgroup-test |
| 15 | + Leaf sub-subgroup. Tests ``--skip-group`` at segment depth 2 and the |
| 16 | + "no further subgroups" code path. |
| 17 | +
|
| 18 | +Repos (4 per group level; minimum 1 each to be useful) |
| 19 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 20 | +top-test-repo-{1..4} in vcs-python-group-test |
| 21 | +sub-test-repo-{1..4} in vcs-python-subgroup-test |
| 22 | +subsub-test-repo-{1..4} in vcs-python-subsubgroup-test |
| 23 | +
|
| 24 | +Shared projects (external dependency: tony/external-shared-repo) |
| 25 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 26 | +Shared into vcs-python-group-test: |
| 27 | + Tests ``--with-shared`` on/off (top-level) and ``--skip-group tony`` |
| 28 | + (skip by external owner). |
| 29 | +Shared into vcs-python-subgroup-test: |
| 30 | + Empirical finding: ``GET /groups/vcs-python-group-test/projects? |
| 31 | + include_subgroups=true&with_shared=true`` does NOT surface subgroup-level |
| 32 | + shares — it only appears when targeting that subgroup directly. |
| 33 | +
|
| 34 | +Expected counts (post-cleanup baseline) |
| 35 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 36 | +- Org mode, no ``--with-shared``: 12 (4+4+4 owned only) |
| 37 | +- Org mode, ``--with-shared``: 13 (+1 top-level share of external-shared-repo) |
| 38 | +- ``--skip-group vcs-python-subgroup-test``: 4 (top-level repos only) |
| 39 | +- ``--skip-group vcs-python-subsubgroup-test``: 8 (top + sub repos only) |
| 40 | +- Subgroup target, ``--with-shared``: 9 (4 sub + 4 subsub + 1 subgroup share) |
| 41 | +
|
| 42 | +External dependency note |
| 43 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
| 44 | +``tony/external-shared-repo`` must remain a public project on gitlab.com. |
| 45 | +If it is deleted, create a replacement under any accessible namespace and |
| 46 | +reshare it into both groups above. The repo only needs to exist and be |
| 47 | +shareable; content does not matter. |
| 48 | +
|
| 49 | +""" |
2 | 50 |
|
3 | 51 | from __future__ import annotations |
4 | 52 |
|
|
0 commit comments