Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 00abad7

Browse files
committed
Added skip_if_iam to some tests that rely on a legacy password
Some of the bluemix initialization tests make a connection to the service to test the init worked correctly. They use a username and password combination so can't work with an IAM API key without additional switching. While they pass in cases where both legacy creds and IAM creds are supplied, if only IAM creds are supplied they fail so should be disabled for IAM.
1 parent aef879c commit 00abad7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit/client_tests.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (C) 2015, 2018 IBM Corp. All rights reserved.
2+
# Copyright (C) 2015, 2019 IBM Corp. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@
4040
from nose.plugins.attrib import attr
4141
from requests import ConnectTimeout, HTTPError
4242

43-
from .unit_t_db_base import skip_if_not_cookie_auth, UnitTestDbBase
43+
from .unit_t_db_base import skip_if_iam, skip_if_not_cookie_auth, UnitTestDbBase
4444
from .. import bytes_, str_
4545

4646

@@ -782,6 +782,7 @@ def test_cloudant_bluemix_context_helper_raise_error_for_missing_iam_and_creds(s
782782
str(err)
783783
)
784784

785+
@skip_if_iam
785786
def test_cloudant_bluemix_dedicated_context_helper(self):
786787
"""
787788
Test that the cloudant_bluemix context helper works as expected when
@@ -888,6 +889,7 @@ def test_bluemix_constructor_with_iam(self):
888889
finally:
889890
c.disconnect()
890891

892+
@skip_if_iam
891893
def test_bluemix_constructor_specify_instance_name(self):
892894
"""
893895
Test instantiating a client object using a VCAP_SERVICES environment

0 commit comments

Comments
 (0)