Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make createuser work for new installations and add basic coverage. #120

Open
wants to merge 11 commits into
base: edge
Choose a base branch
from

Conversation

albu-diku
Copy link

@albu-diku albu-diku commented Sep 23, 2024

Allow user creation to provision the user_db_home directory as well as the file itself which is the situation after config generation is run to completion for a new installation.

Cover the very asic operation of createuser ensuring that a user db and lock file are correctly create upon a call to create a test user.

Depends on: #140
Depends on: #134

@albu-diku albu-diku force-pushed the fix/make-hash-py3 branch 2 times, most recently from deb99dd to 787f546 Compare October 7, 2024 09:12
@albu-diku albu-diku changed the base branch from fix/make-hash-py3 to edge October 7, 2024 09:57
@albu-diku albu-diku force-pushed the fix/createuser-py3 branch 2 times, most recently from 7cb4801 to 298dc07 Compare October 8, 2024 10:12
@albu-diku albu-diku force-pushed the fix/createuser-py3 branch 2 times, most recently from ebbcebd to 9720921 Compare November 2, 2024 10:57
Import the experimental branch version of force_utf8 wholesale adding a
-py(2|3) suffix and expose the correct implementation dependent on PY2.

Include forcing InputException messages to a native string as is done in
experimental (also taken directly from that branch) which ensures the
exception message, which may be unicode, becomes a string everywhere.
A previous revision fixed an immediate problem with test path handling
but knowingly left some things on the table - in particular a split
between container based handling of Python 2 and the local execution
of Python 3 (meaning a potentially inconsistent version relative to
what the project considers officially supported).

Address this entirely: rework the default behaviour of `make test` to
container based execution and use a consistent baseline Python 3.

In order to continue to support rapid local iteration, provide a
separate `make unittest` target which will execute the test suite
locally and is also used as a mechanism to run other supporting tools.

The clean use of containers necessitated various changes that make path
arguments within the testconfig non-overlapping and better isolated.
Adjust all paths generated within the test suite to be always from the
base root instead of relative the output directory. Opt to patch the
makeconfig generator rather than fiddle with generateconfs again.

While here also add support for an environment variable overried that
allows execution of the test suite against arbitrary python 3 versions.
Allow user creation to provision the directries necessary for user
creation to succeed in addition to the database file itself given the
state that exists after config generation is run to completion for a
new installation.

Cover the very basic operation of createuser ensuring that a user db
and lock file are correctly create upon a call to create a test user.
@albu-diku albu-diku added the unit test Code and infrastructure related to unit testing label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unit test Code and infrastructure related to unit testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant