-
Notifications
You must be signed in to change notification settings - Fork 335
fix: use core id provider as backup provider #1798
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
Conversation
@Test | ||
void testSecretManagerWithoutProjectId() { | ||
contextRunner.run( | ||
ctx -> assertThat(ctx.getBean(GcpSecretManagerProperties.class) |
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.
This is not testing GcpSecretManagerAutoConfiguration
.
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.
There's not easy to test the project id as GcpSecretManagerAutoConfiguration
doesn't expose a getter method.
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.
I added a getter method in SecretManagerTemplate
so that project id can be tested.
@Test | ||
void testSecretManagerWithProjectId() { | ||
contextRunner | ||
.withPropertyValues("spring.cloud.gcp.secretmanager.project-id=testProject") |
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.
We need a test with spring.cloud.gcp.project-id=testGlobalProject
.
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.
done
Kudos, SonarCloud Quality Gate passed! |
Fix #1793.