[WIP] t: automatically generate test UIDs #483
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
As mentioned in #480, there are a number of tests throughout the test suite that explicitly define UIDs for users created and used for various tests in flux-accounting, but these have a potential of conflicting with system-defined UIDs.
This PR adds definitions for test UIDs in
sharness.d/flux-accounting.sh
. I basically followed the same formula for testing permissions for certain flux-accounting commands int1026-flux-account-perms.t
, where a UID is created by just incrementing the current UID by 1.I've included an example of replace the use of explicitly defined UIDs in
t1019-mf-priority-info-fetch.t
with the UIDs defined influx-accounting.sh
. If this looks good, then I can update this PR and take it out of [WIP] by including the rest of the test files in the test suite.Fixes #480