-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add descriptions to all configuration variables (#702)
* Add descriptions to all configuration variables Related to #40 Add descriptions to missing configuration variables in `opal-common`, `opal-client`, and `opal-server` configuration files. * **opal-common/config.py**: - Add descriptions to `LOG_FORMAT_INCLUDE_PID`, `FETCH_PROVIDER_MODULES`, `FETCHING_WORKER_COUNT`, `FETCHING_CALLBACK_TIMEOUT`, `FETCHING_ENQUEUE_TIMEOUT`, `GIT_SSH_KEY_FILE`, `AUTH_PUBLIC_KEY_FORMAT`, `AUTH_PUBLIC_KEY`, `AUTH_JWT_AUDIENCE`, `AUTH_JWT_ISSUER`, `ENABLE_METRICS`. * **opal-client/config.py**: - Add descriptions to `POLICY_STORE_TYPE`, `POLICY_STORE_URL`, `POLICY_STORE_AUTH_TYPE`, `POLICY_STORE_AUTH_TOKEN`, `POLICY_STORE_AUTH_OAUTH_SERVER`, `POLICY_STORE_AUTH_OAUTH_CLIENT_ID`, `POLICY_STORE_AUTH_OAUTH_CLIENT_SECRET`, `POLICY_STORE_CONN_RETRY`, `POLICY_UPDATER_CONN_RETRY`, `DATA_STORE_CONN_RETRY`, `DATA_UPDATER_CONN_RETRY`, `POLICY_STORE_POLICY_PATHS_TO_IGNORE`, `POLICY_STORE_TLS_CLIENT_CERT`, `POLICY_STORE_TLS_CLIENT_KEY`, `POLICY_STORE_TLS_CA`, `EXCLUDE_POLICY_STORE_SECRETS`, `INLINE_OPA_ENABLED`, `INLINE_OPA_CONFIG`, `INLINE_OPA_LOG_FORMAT`, `INLINE_CEDAR_ENABLED`, `INLINE_CEDAR_CONFIG`, `INLINE_CEDAR_LOG_FORMAT`, `KEEP_ALIVE_INTERVAL`, `SERVER_URL`, `SERVER_WS_URL`, `SERVER_PUBSUB_URL`, `CLIENT_TOKEN`, `POLICY_SUBSCRIPTION_DIRS`, `DATA_UPDATER_ENABLED`, `DEFAULT_UPDATE_CALLBACK`, `DEFAULT_UPDATE_CALLBACKS`, `SCOPE_ID`. * **opal-server/config.py**: - Add descriptions to `WS_LOCAL_URL`, `WS_TOKEN`, `BROADCAST_URI`, `BROADCAST_CHANNEL_NAME`, `BROADCAST_CONN_LOSS_BUGFIX_EXPERIMENT_ENABLED`, `AUTH_PRIVATE_KEY_FORMAT`, `AUTH_PRIVATE_KEY_PASSPHRASE`, `AUTH_PRIVATE_KEY`, `AUTH_JWKS_URL`, `AUTH_JWKS_STATIC_DIR`, `AUTH_MASTER_TOKEN`, `POLICY_SOURCE_TYPE`, `POLICY_REPO_REUSE_CLONE_PATH`, `POLICY_REPO_MAIN_BRANCH`, `POLICY_REPO_SSH_KEY`, `POLICY_REPO_MANIFEST_PATH`, `POLICY_REPO_CLONE_TIMEOUT`, `LEADER_LOCK_FILE_PATH`, `POLICY_BUNDLE_SERVER_TYPE`, `REPO_WATCHER_ENABLED`, `PUBLISHER_ENABLED`, `BROADCAST_KEEPALIVE_INTERVAL`, `ALL_DATA_TOPIC`, `ALL_DATA_ROUTE`, `ALL_DATA_URL`, `POLICY_REPO_WEBHOOK_SECRET`, `POLICY_REPO_WEBHOOK_ENFORCE_BRANCH`, `POLICY_REPO_WEBHOOK_PARAMS`, `POLICY_REPO_POLLING_INTERVAL`, `ALLOWED_ORIGINS`, `FILTER_FILE_EXTENSIONS`, `BUNDLE_IGNORE`, `NO_RPC_LOGS`, `SERVER_WORKER_COUNT`, `ENABLE_DATADOG_APM`, `SCOPES`, `SCOPES_REPO_CLONES_SHARDS`, `REDIS_URL`, `BASE_DIR`. * Add a test in `opal-common/tests/test_config.py` to check for missing descriptions in configuration variables. * Add descriptions to missing configuration variables and update tests * **opal-server/config.py** - Add example to `FILTER_FILE_EXTENSIONS` description * **opal-common/tests/test_config.py** - Convert tests to use pytest - Add tests to check for missing descriptions in configuration variables - Cover `opal_common_config`, `opal_client_config`, and `opal_server_config`
- Loading branch information
1 parent
fee14db
commit dd8dc96
Showing
4 changed files
with
173 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
from opal_common.config import opal_common_config | ||
from opal_client.config import opal_client_config | ||
from opal_server.config import opal_server_config | ||
|
||
def test_opal_common_config_descriptions(): | ||
for name, entry in opal_common_config.entries.items(): | ||
assert entry.description is not None, f"{name} is missing a description" | ||
|
||
def test_opal_client_config_descriptions(): | ||
for name, entry in opal_client_config.entries.items(): | ||
assert entry.description is not None, f"{name} is missing a description" | ||
|
||
def test_opal_server_config_descriptions(): | ||
for name, entry in opal_server_config.entries.items(): | ||
assert entry.description is not None, f"{name} is missing a description" |
Oops, something went wrong.