diff --git a/projects/vdk-plugins/vdk-kerberos-auth/requirements.txt b/projects/vdk-plugins/vdk-kerberos-auth/requirements.txt index 9a950aa4e2..b56655cad1 100644 --- a/projects/vdk-plugins/vdk-kerberos-auth/requirements.txt +++ b/projects/vdk-plugins/vdk-kerberos-auth/requirements.txt @@ -1,5 +1,7 @@ docker-compose -minikerberos +# Pinned minikerberos because the current implementation is not compatible with 0.3.0+ +# https://github.com/vmware/versatile-data-kit/issues/1169 +minikerberos==0.2.20 pytest pytest-docker requests-kerberos diff --git a/projects/vdk-plugins/vdk-kerberos-auth/setup.py b/projects/vdk-plugins/vdk-kerberos-auth/setup.py index 0a52baebe9..fe7b4aab22 100644 --- a/projects/vdk-plugins/vdk-kerberos-auth/setup.py +++ b/projects/vdk-plugins/vdk-kerberos-auth/setup.py @@ -14,7 +14,12 @@ description="Versatile Data Kit SDK plugin adds Kerberos/GSSAPI support.", long_description=pathlib.Path("README.md").read_text(), long_description_content_type="text/markdown", - install_requires=["vdk-core", "minikerberos", "requests-kerberos", "pykerberos"], + install_requires=[ + "vdk-core", + "minikerberos==0.2.20", + "requests-kerberos", + "pykerberos", + ], package_dir={"": "src"}, packages=setuptools.find_namespace_packages(where="src"), entry_points={ diff --git a/projects/vdk-plugins/vdk-kerberos-auth/tests/test_kerberos.py b/projects/vdk-plugins/vdk-kerberos-auth/tests/test_kerberos.py index 32b6f83a99..52cbeef691 100644 --- a/projects/vdk-plugins/vdk-kerberos-auth/tests/test_kerberos.py +++ b/projects/vdk-plugins/vdk-kerberos-auth/tests/test_kerberos.py @@ -55,7 +55,7 @@ def test_invalid_authentication_mode(self): ["run", jobs_path_from_caller_directory("test-job")] ) - assert "VDK_KRB_AUTH has invalid value" in result.output + assert "VDK_KRB_AUTH has invalid value" in str(result.exception) cli_assert_equal(1, result) def test_kinit_authentication(self): @@ -160,7 +160,7 @@ def test_kinit_authentication_with_wrong_credentials(self): ): result: Result = self.__runner.invoke(["run", data_job_path]) - assert "kinit returned exitcode 1" in result.output + assert "kinit returned exitcode 1" in str(result.exception) cli_assert_equal(1, result) def test_kinit_authentication_error_fail_fast_is_false(self): @@ -197,7 +197,7 @@ def test_kinit_authentication_with_missing_keytab(self): ): result: Result = self.__runner.invoke(["run", data_job_path]) - assert "Cannot locate keytab file" in result.output + assert "Cannot locate keytab file" in str(result.exception) cli_assert_equal(1, result) def test_minikerberos_authentication(self): @@ -235,7 +235,7 @@ def test_minikerberos_authentication_with_wrong_credentials(self): ): result: Result = self.__runner.invoke(["run", data_job_path]) - assert "Client not found in Kerberos database" in result.output + assert "Client not found in Kerberos database" in str(result.exception) cli_assert_equal(1, result) def test_minikerberos_authentication_with_missing_keytab(self): @@ -255,5 +255,5 @@ def test_minikerberos_authentication_with_missing_keytab(self): ): result: Result = self.__runner.invoke(["run", data_job_path]) - assert "Cannot locate keytab file" in result.output + assert "Cannot locate keytab file" in str(result.exception) cli_assert_equal(1, result)