Project

General

Profile

Actions

Bug #25303

open

Database tests have non temporary DDL that prevents running them twice

Added by Clark ANDRIANASOLO 1 day ago. Updated 1 day ago.

Status:
Pending technical review
Priority:
N/A
Category:
Architecture - Test
Target version:
Severity:
Trivial - no functional impact | cosmetic
UX impact:
User visibility:
Effort required:
Very Small
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

We can no longer run database tests in the Webapp more than once, since a non-temporary DDL has been introduced in #24637 :

CREATE TYPE score AS enum ('A', 'B', 'C', 'D', 'E', 'F', 'X');

and that is causing the following error when re-running the tests : org.specs2.specification.core.FatalExecution: ERROR: type "score" already exists.

We should always drop the Type at the end of database tests.

Actions #1

Updated by Clark ANDRIANASOLO 1 day ago

  • Subject changed from Database tests have non temporary DDL that prevents running twice to Database tests have non temporary DDL that prevents running them twice
Actions #2

Updated by Clark ANDRIANASOLO 1 day ago

This happens locally, in CI the tests are running only once so the problem is not visible.

Workaround is to DROP DATABASE test; CREATE DATABASE test; ALTER DATABASE test OWNER TO rudder; as postgres user

Actions #3

Updated by François ARMAND 1 day ago

Can't it be made transcient like the other ones ?

Actions #4

Updated by Clark ANDRIANASOLO 1 day ago

  • Status changed from New to In progress
Actions #5

Updated by Clark ANDRIANASOLO 1 day ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Clark ANDRIANASOLO to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/5813
Actions

Also available in: Atom PDF