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

unset deprecated envvars #836

Merged
merged 1 commit into from
Jan 18, 2022
Merged

unset deprecated envvars #836

merged 1 commit into from
Jan 18, 2022

Conversation

kuritka
Copy link
Collaborator

@kuritka kuritka commented Jan 18, 2022

resolves #835

EDGE_DNS_SERVER, EDGE_DNS_SERVER_PORT are deprecated.
We still keep them because of previous versions of k8gb and set
them explicitly in tests. We have several tests which are inspecting deprecated variables, and count with them to be initially unset. Such tests creates and assert them if needed.

This patch ensures that the variables will not be set before running the tests.
I tested with all supported environment variables in .env file:

RECONCILE_REQUEUE_SECONDS=dummy
CLUSTER_GEO_TAG=dummy
EXT_GSLB_CLUSTERS_GEO_TAGS=dummy
EXTDNS_ENABLED=dummy
EDGE_DNS_SERVERS=dummy
EDGE_DNS_ZONE=dummy
DNS_ZONE=dummy
INFOBLOX_GRID_HOST=dummy
INFOBLOX_WAPI_VERSION=dummy
INFOBLOX_WAPI_PORT=dummy
INFOBLOX_WAPI_USERNAME=dummy
INFOBLOX_WAPI_PASSWORD=dummy
INFOBLOX_HTTP_REQUEST_TIMEOUT=dummy
INFOBLOX_HTTP_POOL_CONNECTIONS=dummy
POD_NAMESPACE=dummy
COREDNS_EXPOSED=dummy
LOG_LEVEL=dummy
LOG_FORMAT=dummy
NO_COLOR=dummy
SPLIT_BRAIN_CHECK=dummy
METRICS_ADDRESS=dummy
EDGE_DNS_SERVER=8.8.8.8
EDGE_DNS_SERVER_PORT=53

Signed-off-by: kuritka [email protected]

resolves #835

EDGE_DNS_SERVER, EDGE_DNS_SERVER_PORT are deprecated.
We still keep them because of previous versions of k8gb and set
them explicitly in tests. We have several tests which are inspecting deprecated variables,
and count with them to be unset. Such tests creates and assert them if needed.

This patch ensures that the variables will not be set before running the tests.
I tested with all supported environment variables in `.env` file:

```env
RECONCILE_REQUEUE_SECONDS=dummy
CLUSTER_GEO_TAG=dummy
EXT_GSLB_CLUSTERS_GEO_TAGS=dummy
EXTDNS_ENABLED=dummy
EDGE_DNS_SERVERS=dummy
EDGE_DNS_ZONE=dummy
DNS_ZONE=dummy
INFOBLOX_GRID_HOST=dummy
INFOBLOX_WAPI_VERSION=dummy
INFOBLOX_WAPI_PORT=dummy
INFOBLOX_WAPI_USERNAME=dummy
INFOBLOX_WAPI_PASSWORD=dummy
INFOBLOX_HTTP_REQUEST_TIMEOUT=dummy
INFOBLOX_HTTP_POOL_CONNECTIONS=dummy
POD_NAMESPACE=dummy
COREDNS_EXPOSED=dummy
LOG_LEVEL=dummy
LOG_FORMAT=dummy
NO_COLOR=dummy
SPLIT_BRAIN_CHECK=dummy
METRICS_ADDRESS=dummy
EDGE_DNS_SERVER=8.8.8.8
EDGE_DNS_SERVER_PORT=53
```

Signed-off-by: kuritka <[email protected]>
Copy link
Contributor

@somaritane somaritane left a comment

Choose a reason for hiding this comment

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

@kuritka awesome, lgtm!

@kuritka kuritka merged commit e7aa022 into master Jan 18, 2022
@kuritka kuritka deleted the 835-fix branch January 18, 2022 15:00
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.

dev: make test target fails with overriden k8gb env vars
2 participants