Skip to content
Snippets Groups Projects

pytest_plugins: Make postgresql_fact accept List[str] in addition to str.

2 unresolved threads

in swh-storage!640, swh.storage will need it to specify explicitly migration files to run.


Migrated from D5016 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
36 36 port: str,
37 37 db_name: str,
38 38 version: Union[str, float, Version],
39 dump_files: Optional[str] = None,
39 dump_files: Union[None, str, List[str]] = None,
40 40 no_truncate_tables: Set[str] = set(),
41 41 ) -> None:
42 42 super().__init__(user, host, port, db_name, version)
43 if dump_files:
43 if dump_files is None:
44 self.dump_files = []
45 elif isinstance(dump_files, str):
44 46 self.dump_files = sorted(glob.glob(dump_files), key=sortkey)
45 47 else:
46 self.dump_files = []
48 self.dump_files = dump_files
  • Fine with the idea.

    Missing tests though.

    Use existing tests [1] to add some equivalent tests with a fixture initialized with the new way you opened here for example.

  • Merge request was returned for changes

  • Author Maintainer

    pfff

  • vlorentz
    vlorentz @vlorentz started a thread on the diff
  • 19 20 no_truncate_tables={"dbversion", "people"},
    20 21 )
    21 22
    23 postgres_fun2 = postgresql_fact(
    24 "postgresql_proc",
    25 db_name="fun2",
  • Build has FAILED

    Patch application report for D5016 (id=17964)

    Rebasing onto 76d2a003...

    Current branch diff-target is up to date.
    Changes applied before test
    commit b37cd9a8d787cc192873143c674d590ae5797cde
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Feb 4 14:43:56 2021 +0100
    
        pytest_plugins: Make postgresql_fact accept List[str] in addition to str.
        
        swh.storage will need it to specify explicitly migration files to run.

    Link to build: https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/193/ See console output for more information: https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/193/console

  • lgtm

    Remains to fix the build (i did not check ;)

  • Merge request was accepted

  • Antoine R. Dumont approved this merge request

    approved this merge request

  • Build has FAILED

    Patch application report for D5016 (id=17964)

    Rebasing onto 76d2a003...

    Current branch diff-target is up to date.
    Changes applied before test
    commit b37cd9a8d787cc192873143c674d590ae5797cde
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Feb 4 14:43:56 2021 +0100
    
        pytest_plugins: Make postgresql_fact accept List[str] in addition to str.
        
        swh.storage will need it to specify explicitly migration files to run.

    Link to build: https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/196/ See console output for more information: https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/196/console

  • Author Maintainer

    fix test failures caused by files being unsorted

  • Build is green

    Patch application report for D5016 (id=18136)

    Rebasing onto 76d2a003...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 576b1047998d876a16464606b78454036afa8dfc
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Feb 4 14:43:56 2021 +0100
    
        pytest_plugins: Make postgresql_fact accept List[str] in addition to str.
        
        swh.storage will need it to specify explicitly migration files to run.

    See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/197/ for more details.

  • Author Maintainer

    Merge request was merged

  • closed

  • Please register or sign in to reply
    Loading