Skip to content

Commit

Permalink
fix kafka tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Mar 25, 2024
1 parent bb63c92 commit a215698
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions logprep/util/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
:code:`LOGPREP_CREDENTIALS_FILE` environment variable has to be set.
This file should provide the credentials that are needed and can either be
in yaml or in json format.
To use the authentication, the :code:`LOGPREP_CREDENTIALS_FILE` file has to be
To use the authentication, the given credentials file has to be
filled with the correct values that correspond to the method you want to use.
some example entries for such a credentials file notation are:
.. code-block:: yaml
:caption: Example for credentials file
"http://target.url":
# example for token given directly via file
Expand All @@ -30,19 +29,19 @@
client_id: <id>
client_secret: <secret>
"http://target.url":
# example for OAuth2 Resource Owner Password Credentials Grant
# example for OAuth2 Resource Owner Password Credentials Grant with authentication for a confidential client
endpoint: <endpoint>
username: <username>
password_file: <path/to/password/file>
client_id: <client_id> # optional if required
client_secret_file: <path/to/secret/file> # optional if required
"http://target.url":
# example for OAuth2 Resource Owner Password Credentials Grant without client_id and secret
# example for OAuth2 Resource Owner Password Credentials Grant for a public unconfidential client
endpoint: <endpoint>
username: <username>
password_file: <path/to/password/file>
"http://target.url":
# example for OAuth2 Resource Owner Password Credentials Grant with inline password
# example for OAuth2 Resource Owner Password Credentials Grant for a public unconfidential client with inline password
endpoint: <endpoint>
username: <username>
password: <password>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/connector/test_real_kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
def setup_module():
if not in_ci:
subprocess.run(
["docker", "compose", "-f", "quickstart/docker compose.yml", "up", "-d", "kafka"]
["docker-compose", "-f", "quickstart/docker compose.yml", "up", "-d", "kafka"]
)


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/util/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class TestOAuth2TokenCredentials:
r"must be <class 'str'>",
),
(
"valdi token",
"valid token",
{"token": "hioinnjdijskjdhfue672534kmsdk"},
None,
None,
Expand Down

0 comments on commit a215698

Please sign in to comment.