Skip to content

test: Change --config-file to config #566

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README-development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ By default, the tests will look for a config file, 'config' in 'tests/resources'
If 'tests/resources' does not exist, the tests will try attempt to use
'tests/configuration/config'.
The default profile is ``DEFAULT``. You can change this with the
``--config-file`` and ``--config-profile`` options.
``--config`` and ``--config-profile`` options.

.. code-block:: sh

# Use a different config file, still using the DEFAULT profile
tox -- --config-file ~/.oci/config
tox -- --config ~/.oci/config

# Using a different profile in the default config file
tox -- --config-profile IAD_PROFILE
Expand Down Expand Up @@ -103,4 +103,4 @@ The SDK is packaged as a wheel. In order to generate the wheel you can run:

python setup.py sdist bdist_wheel

This wheel can then be installed via `pip`.
This wheel can then be installed via `pip`.
4 changes: 2 additions & 2 deletions tests/configuration/config.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Copy this file to file named `config` and fill in the values to run tests
; which require cloud resources. You can also run the tests using a different
; configuration by passing the path to pytest with ``--config-file``.
; For more information on using ``--config-file`` see README-developement.rst
; configuration by passing the path to pytest with ``--config``.
; For more information on using ``--config`` see README-developement.rst
; For more information on how to configure the SDK see
; https://docs.cloud.oracle.com/iaas/Content/API/Concepts/sdkconfig.htm

Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


def pytest_addoption(parser):
parser.addoption("--config-file", action="store", help="location of the config file",
parser.addoption("--config", action="store", help="location of the config file",
default=get_resource_path('config'))
parser.addoption("--config-profile", action="store",
help="profile to use from the config file",
Expand All @@ -30,7 +30,7 @@ def pytest_configure(config):

@pytest.fixture(scope="session")
def config_file(request):
return request.config.getoption("--config-file")
return request.config.getoption("--config")


@pytest.fixture(scope="session")
Expand Down