Skip to content

Commit

Permalink
vdk-kerberos-auth: fix unit test failing from bad logging config (#2923)
Browse files Browse the repository at this point in the history
# Why? 
Test was failing 
# Why? 
change logging config
# How was this tested? 
CICD

---------

Co-authored-by: paulm2 <paulm2@vmware.com>
  • Loading branch information
murphp15 and paulm2 committed Nov 24, 2023
1 parent 3b7c9ae commit 8be388d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions projects/vdk-plugins/.plugin-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
- "projects/vdk-core/src/**/*"

.build-plugin-dind:
image: docker:23.0.1
image: docker:23.0.6
services:
- docker:23.0.1-dind
- docker:23.0.6-dind
variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay2
Expand Down
2 changes: 2 additions & 0 deletions projects/vdk-plugins/vdk-kerberos-auth/.plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get install -y krb5-user
# the line below needs to be removed when cryptolib 1.3.1 or 1.4.0 is released https://community.snowflake.com/s/article/Python-Connector-fails-to-connect-with-LibraryNotFoundError-Error-detecting-the-version-of-libcrypto
- pip install https://github.com/wbond/oscrypto/archive/d5f3437ed24257895ae1edd9e503cfb352e635a8.zip
- !reference [.build-plugin, script]
extends: .build-plugin-dind

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ def setUp(self) -> None:
def test_no_authentication(self):
with mock.patch.dict(
os.environ,
{"VDK_KRB_AUTH_FAIL_FAST": "true"},
{
"VDK_KRB_AUTH_FAIL_FAST": "true",
"VDK_LOG_EXECUTION_RESULT": "True",
},
):
result: Result = self.__runner.invoke(
["run", jobs_path_from_caller_directory("test-job")]
Expand Down Expand Up @@ -67,6 +70,7 @@ def test_kinit_authentication(self):
"VDK_KRB_AUTH": "kinit",
"VDK_KRB_AUTH_FAIL_FAST": "true",
"VDK_KRB5_CONF_FILENAME": krb5_conf_filename,
"VDK_LOG_EXECUTION_RESULT": "True",
},
):
result: Result = self.__runner.invoke(
Expand Down Expand Up @@ -211,6 +215,7 @@ def test_minikerberos_authentication(self):
"VDK_KEYTAB_REALM": "EXAMPLE.COM",
"VDK_KERBEROS_KDC_HOST": "localhost",
"VDK_KRB5_CONF_FILENAME": krb5_conf_filename,
"VDK_LOG_EXECUTION_RESULT": "True",
},
):
result: Result = self.__runner.invoke(
Expand Down

0 comments on commit 8be388d

Please sign in to comment.