-
Notifications
You must be signed in to change notification settings - Fork 2.5k
WIP: mock maintnotif tests #3639
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
base: ndyakov/feature/CAE-1313-maint-cluster
Are you sure you want to change the base?
WIP: mock maintnotif tests #3639
Conversation
…E-1626-cluster-topology-update
…E-1626-cluster-topology-update
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…E-1910-proxy-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Jit has detected 3 important findings in this PR that you should review.
The findings are detailed below as separate comments.
It’s highly recommended that you fix these security issues before merge.
Repository Risks:
- Database Integration: Connects to a database, often involving sensitive data that must be securely managed.
- Internally Accessible: Accessible only within the internal network, reducing exposure to external threats but still requiring proper controls.
Repository Context:
graph LR
GitHub$Repository_U23_redis/go_U2D_redis["GitHub Repository<br/>redis/go-redis"]:::GitHub$Repository
Team_U23_client_U2D_developers["Team<br/>client-developers"]:::Team
Team_U23_client_U2D_docs["Team<br/>client-docs"]:::Team
DBIntegration_U23_redis["DBIntegration<br/>redis"]:::DBIntegration
Team_U23_client_U2D_developers -- "Owns" --> GitHub$Repository_U23_redis/go_U2D_redis
Team_U23_client_U2D_docs -- "Owns" --> GitHub$Repository_U23_redis/go_U2D_redis
GitHub$Repository_U23_redis/go_U2D_redis -- "Is accessible to" --> DBIntegration_U23_redis
| os.Unsetenv("FAULT_INJECTION_API_URL") | ||
|
|
||
| // Restore environment after test | ||
| defer func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use t.Cleanup instead of defer?
This ensures the restoration logic runs even if the test panics.
Something like this:
t.Cleanup(func() {
if origConfigPath != "" {
os.Setenv("REDIS_ENDPOINTS_CONFIG_PATH", origConfigPath)
}
if origFIURL != "" {
os.Setenv("FAULT_INJECTION_API_URL", origFIURL)
}
})
…E-1910-proxy-tests
No description provided.