-
Notifications
You must be signed in to change notification settings - Fork 13
APIGOV-28603 - TA to use updated https endpoints and beats lib drop #1078
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
Open
sbolosan
wants to merge
17
commits into
main
Choose a base branch
from
APIGOV-28603
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ca1e7e4
APIGOV-28603 - https endpoint and beats dropping
sbolosan 433d7c5
Merge branch 'main' into APIGOV-28603
sbolosan f85a1b7
APIGOV-28603 - update panic fix
sbolosan df5c6ef
Merge branch 'main' into APIGOV-28603
sbolosan 1485888
APIGOV-28603 - move batch implementation inside sdk
sbolosan c6648f5
APIGOV-28603 - Fix GetAccessRequest to strip remoteApiName_ prefix
sbolosan 06d1507
APIGOV-28603 - update rest of locations for StripSummaryEventPrefix
sbolosan 051c120
Merge branch 'main' into APIGOV-28603
sbolosan ade84e7
APIGOV-28603 - update to fulfill path config from beats removal
sbolosan e30bd96
APIGOV-28603 - remove go ucfg
sbolosan ea24d11
APIGOV-28603 - config fix for v7 TA
sbolosan 5e51b49
APIGOV-28603 - bump sdk for bringing back string value
sbolosan 6a394e4
APIGOV-28603 - fix alias
sbolosan 3b680c7
APIGOV-28603 - update comments
sbolosan 48d00a1
APIGOV-28603 - remove replace for sarama
sbolosan a8bd02a
APIGOV-28603 - restructure based on PR review
sbolosan 62ded1a
APIGOV-28603 - update based on PR comments
sbolosan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,53 @@ | ||
| package properties | ||
|
|
||
| import ( | ||
| "bytes" | ||
| "testing" | ||
|
|
||
| "github.com/spf13/cobra" | ||
| "github.com/spf13/viper" | ||
| "github.com/stretchr/testify/assert" | ||
| ) | ||
|
|
||
| // TestAliasKeyPrefixResolvesNestedYamlValue guards against a regression where yaml nested under | ||
| // an agent's own name (e.g. "traceability_agent:") silently stopped resolving. | ||
| func TestAliasKeyPrefixResolvesNestedYamlValue(t *testing.T) { | ||
| yamlContent := []byte(` | ||
| traceability_agent: | ||
| status: | ||
| port: 8990 | ||
| `) | ||
|
|
||
| tests := map[string]struct { | ||
| aliasKeyPrefix string | ||
| expectedPort int | ||
| }{ | ||
| "no alias prefix set, falls back to flag default": { | ||
| aliasKeyPrefix: "", | ||
| expectedPort: 8989, | ||
| }, | ||
| "alias prefix set, resolves nested yaml value": { | ||
| aliasKeyPrefix: "traceability_agent", | ||
| expectedPort: 8990, | ||
| }, | ||
| } | ||
|
|
||
| for name, tc := range tests { | ||
| tc := tc | ||
| t.Run(name, func(t *testing.T) { | ||
| viper.Reset() | ||
| SetAliasKeyPrefix(tc.aliasKeyPrefix) | ||
| defer SetAliasKeyPrefix("") | ||
|
|
||
| rootCmd := &cobra.Command{Use: "test"} | ||
| props := NewPropertiesWithSecretResolver(rootCmd, nil) | ||
| props.AddIntProperty("status.port", 8989, "test port property") | ||
|
|
||
| viper.SetConfigType("yaml") | ||
| err := viper.ReadConfig(bytes.NewReader(yamlContent)) | ||
| assert.Nil(t, err) | ||
|
|
||
| assert.Equal(t, tc.expectedPort, props.IntPropertyValue("status.port")) | ||
| }) | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.