Skip to content

Commit b38a12f

Browse files
ibm-devx-sdkpadamstx
authored andcommitted
test: fix skipping of int tests and add config file
1 parent ec67c58 commit b38a12f

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ venv/
5555
python3/
5656

5757
.env
58+
*.env
5859

5960
# resources
6061
resources/output.wav

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ before_install:
1616
- sudo apt-get update
1717
- sudo apt-get install pandoc
1818
- pip install pypandoc
19-
# - '[ "${TRAVIS_PULL_REQUEST}" == "false" ] && openssl aes-256-cbc -K $ghost_key -iv $ghost_iv -in .ghostenv.enc -out .ghostenv -d || true'
19+
- '[ "${TRAVIS_PULL_REQUEST}" == "false" ] && openssl aes-256-cbc -K $encrypted_3058bc69cb40_key -iv $encrypted_3058bc69cb40_iv -in ghost.env.enc -out ghost.env -d || true'
2020

2121
install:
2222
- pip install tox-travis

ghost.env.enc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
��e��[���CTL{����a��/�p�R��Dt#��e4 l��=�e�Ba��?��MH[[��E�#�d�J5�qX��0B� �zXzH���b�6�U���xBD_����RW�ЪP]Q|���9��&��֛R���ՙ�t�b�>O�rt��dr�I �����G�sv�6�6NHp;����P7%�L�3�S3
2+
U&�6�ġ)UV|}[E��U��.MIR,>�u��q������W��zߍ�Bt2�6�?���~��C�=���;����5Y���'d߱^���N�Wef}�?@$# ���P�gT���:|�ș�{�U��K|S'����l��c�>��\��#���/����،
3+
�A���|��\���ԶL�\�f����%�����s���̳�K��d鉚�d�A��RkB�w�8�{���x�0ذB���<'�Á�WV� �S�� �nOV@���H��<!���Z���xl�<�G�<�8���}

test/integration/test_global_search_v2.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from jproperties import Properties
2525

2626
# Read config file
27-
configFile = '.ghostenv'
27+
configFile = 'ghost.env'
2828
config = {}
2929
configLoaded = None
3030

@@ -39,7 +39,7 @@
3939
config['GST_IAM_URL'] = p['GST_IAM_URL'].data
4040
config['GST_QUERY'] = p['GST_QUERY'].data
4141
config['GST_RESOURCE_CRN'] = p['GST_RESOURCE_CRN'].data
42-
configLoaded = true
42+
configLoaded = True
4343
except:
4444
print('External configuration was not found, skipping tests...')
4545

@@ -50,7 +50,12 @@ def setUp(self):
5050
self.skipTest("External configuration not available, skipping...")
5151

5252
# Create authenticator with IAM API key (it generates bearer token automatically)
53-
authenticator = IAMAuthenticator(config['GST_IINTERNA_APIKEY'], url=config['GST_IAM_URL'])
53+
apikey = config['GST_IINTERNA_APIKEY']
54+
iam_url = config['GST_IAM_URL']
55+
assert apikey is not None
56+
assert iam_url is not None
57+
authenticator = IAMAuthenticator(apikey, url=iam_url)
58+
5459
self.global_search = GlobalSearchV2(authenticator=authenticator)
5560
self.global_search.set_service_url(config['GST_API_URL'])
5661
self.items = set(config['GST_RESOURCE_NAMES'].split(','))

test/integration/test_global_tagging_v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def getRandomIntegerString(length=8):
3636
return res
3737

3838
# Read config file
39-
configFile = '.ghostenv'
39+
configFile = 'ghost.env'
4040
config = {}
4141
configLoaded = None
4242

@@ -51,7 +51,7 @@ def getRandomIntegerString(length=8):
5151
config['GST_IAM_URL'] = p['GST_IAM_URL'].data
5252
config['GST_QUERY'] = p['GST_QUERY'].data
5353
config['GST_RESOURCE_CRN'] = p['GST_RESOURCE_CRN'].data
54-
configLoaded = true
54+
configLoaded = True
5555
except:
5656
print('External configuration was not found, skipping tests...')
5757

0 commit comments

Comments
 (0)