Skip to content

Commit

Permalink
Fix part of unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
robinholzi committed Apr 26, 2024
1 parent b5ae6a5 commit e3d209a
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include *.md
include alembic.ini
include dev_config.toml
include config.toml
include environment.yml
include init_db.py
include .flake8
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pip install -e .
Use the CLI to create a `Quetz` instance:

```bash
quetz run test_quetz --copy-conf ./dev_config.toml --dev --reload
quetz run test_quetz --copy-conf ./config.toml --dev --reload
```

Links:
Expand Down Expand Up @@ -188,7 +188,7 @@ sudo -u postgres psql -h localhost -c 'CREATE DATABASE quetz OWNER postgres;'

### Deploying Quetz with PostgreSQL backend

Then in your configuration file (such as `dev_config.toml`) replace the `[sqlalchemy]` section with:
Then in your configuration file (such as `config.toml`) replace the `[sqlalchemy]` section with:

```ini
[sqlalchemy]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/source/deploying/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Config file

Most functionalities of quetz can be configured with a config file in toml format, such as this one:

.. literalinclude:: ../../../dev_config.toml
.. literalinclude:: ../../../config.toml


``sqlalchemy`` section
Expand Down
2 changes: 1 addition & 1 deletion docs/source/deploying/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can then create a database in PostgreSQL for quetz tables:
Deploying Quetz with PostgreSQL backend
"""""""""""""""""""""""""""""""""""""""

Then in your configuration file (such as `dev_config.toml`) replace the `[sqlalchemy]` section with:
Then in your configuration file (such as `config.toml`) replace the `[sqlalchemy]` section with:

.. code::
Expand Down
2 changes: 1 addition & 1 deletion plugins/quetz_content_trust/docs/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Few scripts are provided to perform a manual integration test of package signing
This is intended to be used by channels owners/maintainers to get familiar with the workflow of generating TUF roles (delegations, etc.) and push them on a Quetz server.

For that, simply run the 2 following commands from your quetz source directory:
- `quetz run test_quetz --copy-conf ./dev_config.toml --dev --reload --delete` to get an up and running server
- `quetz run test_quetz --copy-conf ./config.toml --dev --reload --delete` to get an up and running server
- `python plugins/quetz_content_trust/docs/test_script.py` to generate TUF roles, push them on the server but also push an empty `test-package` package

then just test from client side: `micromamba create -n foo -c http://127.0.0.1:8000/get/channel0 test-package --no-rc -y -vvv --repodata-ttl=0 --experimental --verify-artifacts`
Expand Down
4 changes: 2 additions & 2 deletions quetz/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def create(
],
copy_conf: Annotated[
Optional[str],
typer.Option(help="The configuration to copy from (e.g. dev_config.toml)"),
typer.Option(help="The configuration to copy from (e.g. config.toml)"),
] = None,
create_conf: Annotated[
bool,
Expand Down Expand Up @@ -602,7 +602,7 @@ def run(
path: Annotated[str, typer.Argument(help="The path of the deployment")],
copy_conf: Annotated[
Optional[str],
typer.Option(help="The configuration to copy from (e.g. dev_config.toml)"),
typer.Option(help="The configuration to copy from (e.g. config.toml)"),
] = None,
create_conf: Annotated[
bool,
Expand Down
3 changes: 3 additions & 0 deletions quetz/testing/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def config_base(database_url, plugins, config_auth):
return f"""
{config_auth}
[general]
dev = true
[sqlalchemy]
database_url = "{database_url}"
Expand Down
2 changes: 1 addition & 1 deletion set_env_dev.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export QUETZ_CONFIG_FILE="${PWD}/dev_config.toml"
export QUETZ_CONFIG_FILE="${PWD}/config.toml"

0 comments on commit e3d209a

Please sign in to comment.