Skip to content

Commit

Permalink
Update CI testing file (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
sambles committed Nov 8, 2023
1 parent 6777525 commit 340bcc1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
21 changes: 21 additions & 0 deletions docker/Dockerfile.piwind_server
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM coreoasis/api_server:latest

COPY --chown=server:server $ods_package ./
USER server

# Install ods_tools from package file (Optional) 'docker build --build-arg ods_package=<whl>'
ARG ods_package
RUN if [ ! -z "$ods_package" ]; then \
pip uninstall ods-tools -y; \
pip install --user --no-warn-script-location $ods_package; \
fi

# Install ODS-Tools from git branch (Optional) 'docker build --build-arg ods_tools_branch=develop'
ARG ods_tools_branch
RUN if [ ! -z "$ods_tools_branch" ] ; then \
apt update && apt install -y git; \
pip uninstall ods-tools -y; \
pip install --user --no-warn-script-location -v git+https://git@github.com/OasisLMF/ODS_Tools.git@${ods_tools_branch}#egg=ods-tools; \
fi


6 changes: 5 additions & 1 deletion tests/modelcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ def wait_for_api(module_scoped_container_getter):
# Wait for Model
oasis_client = APIClient(api_url=api_url)
oasis_client.api.mount('http://', HTTPAdapter(max_retries=retries))
assert oasis_client.models.get(1)

model_headers = {'authorization': f"Bearer {oasis_client.api.tkn_access}"}
model_url = f"{api_url}/V1/models/1/"
assert request_session.get(model_url, headers=model_headers)
#assert oasis_client.models.get(1)
return oasis_client


Expand Down

0 comments on commit 340bcc1

Please sign in to comment.