Skip to content
Snippets Groups Projects

Prefix task types used in tests with 'test-'

  1. Feb 08, 2022
    • David Douard's avatar
      Prefix task types used in tests with 'test-' · c46ffadf
      David Douard authored
      so that tests do not depend on a lucky guess on what the scheduler db
      state actually is. DB initialization scripts do create task types for
      git, hg and svn (used in tests) but these tests depends on the fact the
      db fixture has been called already once before, so tables are
      truncated (especially the task and task_type ones).
      
      For example running a single test involved in task-type creation was
      failing (eg. 'pytest swh -k test_create_task_type_idempotence').
      
      This commit does make tests not collide with any existing task or task
      type initialization scripts may create.
      
      Note that this also means that there is actually no test dealing with
      the scheduler db state after initialization, which is not grat and
      should be addressed.
      c46ffadf
Loading