Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/builder: drop misleading quotes from config #88

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

ondrejbudai
Copy link
Member

configparser treats quotes literally:

client_id = "koji"

translates to the following python string:

'"koji"'

This doesn't matter in the test because the oauth mock from osbuild-composer
actually ignores the credentials and return the token in every case.

But if you want to take this config as an example, you will probably put the
credentials automatically inside the quotes which will not work because a real
oauth server will refuse the client ID surrounded by quotes.

Note that .conf works different than .toml:

TOML requires to have strings in quotes. Yeah, consistency. 🤷

configparser treats quotes literally:

client_id = "koji"

translates to the following python string:

'"koji"'

This doesn't matter in the test because the oauth mock from osbuild-composer
actually ignores the credentials and return the token in every case.

But if you want to take this config as an example, you will probably put the
credentials automatically inside the quotes which will not work because a real
oauth server will refuse the client ID surrounded by quotes.

Note that .conf works different than .toml:

TOML requires to have strings in quotes. Yeah, consistency. 🤷
@ondrejbudai ondrejbudai requested a review from gicmo March 23, 2022 14:13
Copy link
Contributor

@gicmo gicmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gicmo gicmo merged commit 039fc6b into osbuild:main Mar 23, 2022
@ondrejbudai ondrejbudai deleted the oauth-conf branch March 24, 2022 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants