Make unit tests use default config

This commit is contained in:
justin-h-loi 2023-08-15 16:14:55 -04:00 committed by arp102
parent bfa3c01893
commit 084fbcdb61
4 changed files with 4 additions and 23 deletions
.github/workflows
kmip
core
services/server

View File

@ -10,6 +10,7 @@ jobs:
build:
runs-on: ${{ matrix.os }}
env:
UNITTEST: ${{ true }}
TOXENV: ${{ matrix.test }}
RUN_INTEGRATION_TESTS: ${{ matrix.test_number}}
steps:

View File

@ -1,21 +0,0 @@
name: "Run Travis.yml"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Run .travis.yml build script
uses: ktomk/run-travis-yml@v1.8.1
with:
file: .travis.yml
steps: |
install
script
allow-failure: false

View File

@ -27,6 +27,8 @@ CONFIG_FILE = [
os.path.normpath(os.path.join(FILE_PATH, '../pykmip.conf')),
os.path.normpath(os.path.join(FILE_PATH, '../kmipconfig.ini'))]
if os.environ.get("UNITTEST"):
CONFIG_FILE = []
class ConfigHelper(object):
NONE_VALUE = 'None'

View File

@ -128,8 +128,7 @@ class KmipSession(threading.Thread):
try:
if hasattr(self._connection, 'shared_ciphers') \
and self._connection.shared_ciphers() is not None:
and self._connection.shared_ciphers() is not None:
shared_ciphers = self._connection.shared_ciphers()
self._logger.debug(
"Possible session ciphers: {0}".format(len(shared_ciphers))