Skip to content

Conversation

@dverite
Copy link
Collaborator

@dverite dverite commented Jul 15, 2025

  • don't use the hardcoded "unittest" db name (dangerous in local tests)
  • fix generation of random table names
  • clean up the dozen of yaml files left by each run

dverite added 3 commits July 15, 2025 09:36
Fixes an issue with:
 cat /dev/urandom | head -n 1 | base64 | ...
When a linefeed character appears in the first few random bytes,
the string is too short, and may conflict with other generated
short names (actually seen on some invocations of make bats-test...)

Use `head -c 12 /dev/urandom` instead, and move it to
a dedicated function.

Signed-off-by: Daniel Vérité <dverite@gmail.com>
Signed-off-by: Daniel Vérité <dverite@gmail.com>
…est"

Previously if a database named "unittest" pre-existed, it was dropped
and recreated unconditionally.
Now the tests generate a random database name, and use the environment
variable PPM_DATABASE to refer to it.
Additionally, PGDATABASE is used for the partition manager instead
of a hardcoded URL in the template file.

Signed-off-by: Daniel Vérité <dverite@gmail.com>
@dverite
Copy link
Collaborator Author

dverite commented Jul 15, 2025

#storage

Copy link
Contributor

@dcupif dcupif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dverite dverite merged commit bbe3df6 into main Jul 15, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants