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

feat: update package details #61

Merged
merged 4 commits into from
Sep 14, 2023
Merged
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 docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt -y install git jq

RUN git clone https://github.com/elixir-cloud-aai/tes-compliance-suite.git
RUN git clone https://github.com/elixir-cloud-aai/openapi-test-runner.git

# Install TES Compliance suite
WORKDIR /app/tes-compliance-suite
WORKDIR /app/openapi-test-runner
RUN python3.8 setup.py install

# Precreate results directory
RUN mkdir results

# Copy over specific instructions around how to run the tests
COPY entrypoint.sh /app/tes-compliance-suite/entrypoint.sh
COPY entrypoint.sh /app/openapi-test-runner/entrypoint.sh

# If using entrpyoint script with no edits, set TES endpoint url here
ENV TES_ENDPOINT_URL=http://localhost/
Expand Down
2 changes: 1 addition & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# expects 'TesEndpointUrl' to already be set, can be done in Dockerfile
# default is set to localhost
tes-compliance-suite report --server $TES_ENDPOINT_URL --include-tags all --output_path results
openapi-test-runner report --server $TES_ENDPOINT_URL --include-tags all --output_path results
24 changes: 12 additions & 12 deletions docs/utility.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ The report can also be viewed as HTML web page in local server.
Python 3.8 is the supported Python version and should be installed as a pre-requisite.
The following steps will guide you to install the suite.

1. Clone the latest codebase from [https://github.com/elixir-cloud-aai/tes-compliance-suite](https://github.com/elixir-cloud-aai/tes-compliance-suite)
1. Clone the latest codebase from [https://github.com/elixir-cloud-aai/openapi-test-runner](https://github.com/elixir-cloud-aai/openapi-test-runner)

```base
git clone https://github.com/elixir-cloud-aai/tes-compliance-suite.git
git clone https://github.com/elixir-cloud-aai/openapi-test-runner.git
```
2. Enter tes-compliance-suite directory and install
2. Enter openapi-test-runner directory and install

```base
cd tes-compliance-suite
cd openapi-test-runner
python setup.py install
```
3. Confirm installation by executing the tes-compliance-suite command
3. Confirm installation by executing the openapi-test-runner command

```base
tes-compliance-suite report --help
openapi-test-runner report --help
```

## YAML Test files
Expand Down Expand Up @@ -134,7 +134,7 @@ The following command line parameters can be run:

- Multiple tags can be set by providing multiple `--include-tags` or `--exclude-tags` parameter.
```base
tes-compliance-suite report --server "https://test.com/" --include-tags tag_1 --include-tags TAG2 --include-tags 123
openapi-test-runner report --server "https://test.com/" --include-tags tag_1 --include-tags TAG2 --include-tags 123
```

- A test is run if none of the `--exclude-tags` match any of the Yaml test tags, and at least one of the `--include-tags` is present in the Yaml test tags. Example -
Expand All @@ -149,19 +149,19 @@ The following command line parameters can be run:

1. Some examples for command line are:
```base
tes-compliance-suite report --server "https://test.com/" --version "1.0.0"
tes-compliance-suite report --server "https://test.com/" --version "1.0.0" --include-tags "schema_validation_only" --test-path "path/to/test" --output_path "path/to/store" --serve --port 9090 --uptime 1000
openapi-test-runner report --server "https://test.com/" --version "1.0.0"
openapi-test-runner report --server "https://test.com/" --version "1.0.0" --include-tags "schema_validation_only" --test-path "path/to/test" --output_path "path/to/store" --serve --port 9090 --uptime 1000
```

2. If the HOME python version is different from 3.8, then absolute path with reference to 3.8 should be used.
```base
path/to/python3.8/python setup.py install
path/to/python3.8/Scripts/tes-compliance-suite report
path/to/python3.8/Scripts/openapi-test-runner report
```

## Docker image

The project has a [Dockerfile][dockerfile] that creates an ubuntu based container image ready to run tes-compliance-suite. It uses [entrypoint.sh][entrypoint] as an entrypoint, which is most useful if the url of the server changes each time the test suite is run or if only specific tests need to be run. Also, if the server requires basic authentication to connect to, entrypoint.sh can be edited to accept not just the endpoint url, but the username and password as well.
The project has a [Dockerfile][dockerfile] that creates an ubuntu based container image ready to run openapi-test-runner. It uses [entrypoint.sh][entrypoint] as an entrypoint, which is most useful if the url of the server changes each time the test suite is run or if only specific tests need to be run. Also, if the server requires basic authentication to connect to, entrypoint.sh can be edited to accept not just the endpoint url, but the username and password as well.

```base
http://$tesuser:$tespassword@$teshostname/
Expand All @@ -175,7 +175,7 @@ teshostname=$(jq -r '.TesHostname' TesCredentials.json)
tesuser=$(jq -r '.TesUsername' TesCredentials.json)
tespassword=$(jq -r '.TesPassword' TesCredentials.json)

tes-compliance-suite report --server http://$tesuser:$tespassword@$teshostname/ --include-tags all --output_path results
openapi-test-runner report --server http://$tesuser:$tespassword@$teshostname/ --include-tags all --output_path results
```

[res-test-syntax]: test_config/test_syntax.yml
Expand Down
22 changes: 12 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
install_requires: list = _file.read().splitlines()

setup(
name='tes-compliance-suite',
name='openapi-test-runner',
version='0.1.0',
description='TES Compliance Suite to perform conformance testing to API specs and functionality',
description='OpenAPI test runner to perform conformance testing to API specs and functionality',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/elixir-cloud-aai/tes-compliance-suite',
url='https://github.com/elixir-cloud-aai/openapi-test-runner',
author='Lakshya Garg',
author_email='[email protected]',
maintainer='ELIXIR Cloud & AAI',
Expand All @@ -38,21 +38,23 @@
],
entry_points={
'console_scripts': [
'tes-compliance-suite = compliance_suite.cli:main',
'openapi-test-runner = compliance_suite.cli:main',
],
},
keywords=(
'ga4gh tes elixir rest api app server openapi '
'python compliance testing pydantic yaml '
),
project_urls={
'Repository': 'https://github.com/elixir-cloud-aai/tes-compliance-suite',
'Repository': 'https://github.com/elixir-cloud-aai/openapi-test-runner',
'ELIXIR Cloud & AAI': 'https://elixir-europe.github.io/cloud/',
'Tracker': 'https://github.com/elixir-cloud-aai/tes-compliance-suite/issues',
'Tracker': 'https://github.com/elixir-cloud-aai/openapi-test-runner/issues',
},
license='Apache License 2.0',
packages=find_packages(),
package_data={'': ['../tests/*', 'web/*/*']},
install_requires=install_requires,
include_package_data=True,
packages=find_packages(exclude=[
'unittests',
'unittests.*'
]),
package_data={'': ['../tests/*', '../docs/test_config/*', 'web/*/*']},
install_requires=install_requires
)