-
Notifications
You must be signed in to change notification settings - Fork 166
Switch to gcp from gce #2488
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
Switch to gcp from gce #2488
Conversation
) | ||
|
||
func TestNormalizeGcp(t *testing.T) { | ||
expectedCfgMap, err := confmaptest.LoadConf("testdata/normalize_gcp/upstream_agent_config_post_migration.yaml") |
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.
imo it greatly improves readability and lessens maintenance requirements to use confmap.NewFromStringMap()
directly instead of having separate files.
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 like the file approach to make it easier to copy a troublesome or relevant customer/upstream config as-is into the test folders, and prefer to have the "logic" separated from the test data to reduce visual scope, but I don't have a strong opinion and could be swayed if you're invested enough to make a counter argument on this.
As-is I'd say "if someone else on the team agrees with your take I'll treat that as consensus and make the change, otherwise plan to keep the same".
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.
One argument that would convince me would be "You can reduce the copy-pasta in your configs if you generate it in code", since that would reduce the size of our test suite.
@@ -0,0 +1,35 @@ | |||
receivers: |
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.
is this file used?
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.
Not anymore... thank you 😔
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.
fwiw I think its more expansive checks could be helpful in testing
Co-authored-by: Antoine Toulme <[email protected]>
as specified in breaking changes, need to convert these
I'm sure there's some cleaner ways to organize the code and am receptive to any suggestions if you have some.