-
-
Notifications
You must be signed in to change notification settings - Fork 140
Update overrides section behavior in imports and inline
#1122
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
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
e87e944
updates
aknysh 2e57423
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 9018295
updates
aknysh 5c12452
updates
aknysh 33b3cad
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 8103901
updates
aknysh 180e9a9
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh a0230c8
updates
aknysh d3ec699
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 4afa07c
updates
aknysh 9c05401
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 3213361
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 7a3b0e6
updates
aknysh 3ab1324
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh a0abd71
updates
aknysh d2ac755
updates
aknysh dbae24c
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 60c79e2
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 83dcb7d
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh b7fd479
updates
aknysh dfd7810
updates
aknysh a78edea
updates
aknysh ba71825
updates
aknysh 6d1ceea
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 7fc7609
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 7b8a753
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh 6b04e9d
updates
aknysh 13ccd7a
updates
aknysh 96fc196
updates
aknysh 815a0b3
updates
aknysh 0cf449a
add unit tests
aknysh 6ef13c4
add unit tests
aknysh bb7e0e9
add unit tests
aknysh ea8edbb
add unit tests
aknysh 66aa85c
Merge remote-tracking branch 'origin/main' into update-overrides-in-i…
aknysh 693b0b5
Merge branch 'main' into update-overrides-in-imports
aknysh 327a616
Merge remote-tracking branch 'origin/update-overrides-in-imports' int…
aknysh e4e9ea9
add unit tests
aknysh bbebfde
[autofix.ci] apply automated fixes
autofix-ci[bot] af023e2
add unit tests
aknysh ffc4471
Merge remote-tracking branch 'origin/update-overrides-in-imports' int…
aknysh df94fc4
add unit tests
aknysh 930fbd7
add unit tests
aknysh beae59b
add unit tests
aknysh cfa2360
add unit tests
aknysh e796963
Update pkg/utils/markdown_utils.go
aknysh 295446e
[autofix.ci] apply automated fixes
autofix-ci[bot] 46f3f1f
add unit tests
aknysh 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,6 +186,7 @@ issues: | |
| - funlen | ||
| - revive | ||
| - gci | ||
| - errcheck | ||
|
|
||
| output: | ||
| formats: | ||
|
|
||
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,35 @@ | ||
| package cmd | ||
|
|
||
| import ( | ||
| "bytes" | ||
| "io" | ||
| "os" | ||
| "testing" | ||
|
|
||
| "github.com/stretchr/testify/assert" | ||
| ) | ||
|
|
||
| func TestAboutCmd(t *testing.T) { | ||
| // Capture stdout since utils.PrintfMarkdown writes directly to os.Stdout | ||
| oldStdout := os.Stdout | ||
| r, w, _ := os.Pipe() | ||
| os.Stdout = w | ||
|
|
||
| // Execute the command | ||
| err := aboutCmd.RunE(aboutCmd, []string{}) | ||
| assert.NoError(t, err, "'atmos about' command should execute without error") | ||
|
|
||
| // Close the writer and restore stdout | ||
| err = w.Close() | ||
| assert.NoError(t, err, "'atmos about' command should execute without error") | ||
|
|
||
| os.Stdout = oldStdout | ||
|
|
||
| // Read captured output | ||
| var output bytes.Buffer | ||
| _, err = io.Copy(&output, r) | ||
| assert.NoError(t, err, "'atmos about' command should execute without error") | ||
|
|
||
| // Check if output contains expected markdown content | ||
| assert.Contains(t, output.String(), aboutMarkdown, "'atmos about' output should contain information about Atmos") | ||
| } |
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,35 @@ | ||
| package cmd | ||
|
|
||
| import ( | ||
| "bytes" | ||
| "io" | ||
| "os" | ||
| "testing" | ||
|
|
||
| "github.com/stretchr/testify/assert" | ||
| ) | ||
|
|
||
| func TestSupportCmd(t *testing.T) { | ||
| // Capture stdout since utils.PrintfMarkdown writes directly to os.Stdout | ||
| oldStdout := os.Stdout | ||
| r, w, _ := os.Pipe() | ||
| os.Stdout = w | ||
|
|
||
| // Execute the command | ||
| err := supportCmd.RunE(supportCmd, []string{}) | ||
| assert.NoError(t, err, "'atmos support' command should execute without error") | ||
|
|
||
| // Close the writer and restore stdout | ||
| err = w.Close() | ||
| assert.NoError(t, err, "'atmos support' command should execute without error") | ||
|
|
||
| os.Stdout = oldStdout | ||
|
|
||
| // Read captured output | ||
| var output bytes.Buffer | ||
| _, err = io.Copy(&output, r) | ||
| assert.NoError(t, err, "'atmos support' command should execute without error") | ||
|
|
||
| // Check if output contains expected markdown content | ||
| assert.Contains(t, output.String(), supportMarkdown, "'atmos support' output should contain information about Cloud Posse Atmos support") | ||
| } |
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,51 @@ | ||
| package cmd | ||
|
|
||
| import ( | ||
| "bytes" | ||
| "io" | ||
| "os" | ||
| "testing" | ||
|
|
||
| "github.com/stretchr/testify/assert" | ||
| ) | ||
|
|
||
| func TestWorkflowCmd(t *testing.T) { | ||
| stacksPath := "../tests/fixtures/scenarios/atmos-overrides-section" | ||
|
|
||
| err := os.Setenv("ATMOS_CLI_CONFIG_PATH", stacksPath) | ||
| assert.NoError(t, err, "Setting 'ATMOS_CLI_CONFIG_PATH' environment variable should execute without error") | ||
|
|
||
| err = os.Setenv("ATMOS_BASE_PATH", stacksPath) | ||
| assert.NoError(t, err, "Setting 'ATMOS_BASE_PATH' environment variable should execute without error") | ||
|
|
||
| // Capture stdout | ||
| oldStdout := os.Stdout | ||
| r, w, _ := os.Pipe() | ||
| os.Stdout = w | ||
|
|
||
| expectedOutput := `atmos describe component c1 -s prod | ||
| atmos describe component c1 -s staging | ||
| atmos describe component c1 -s dev | ||
| atmos describe component c1 -s sandbox | ||
| atmos describe component c1 -s test | ||
| ` | ||
|
|
||
| // Execute the command | ||
| RootCmd.SetArgs([]string{"workflow", "--file", "workflows", "show-all-describe-component-commands"}) | ||
| err = RootCmd.Execute() | ||
| assert.NoError(t, err, "'atmos workflow' command should execute without error") | ||
|
|
||
| // Close the writer and restore stdout | ||
| err = w.Close() | ||
| assert.NoError(t, err, "'atmos workflow' command should execute without error") | ||
|
|
||
| os.Stdout = oldStdout | ||
|
|
||
| // Read captured output | ||
| var output bytes.Buffer | ||
| _, err = io.Copy(&output, r) | ||
| assert.NoError(t, err, "'atmos workflow' command should execute without error") | ||
|
|
||
| // Check if output contains expected markdown content | ||
| assert.Contains(t, output.String(), expectedOutput, "'atmos workflow' output should contain information about workflows") | ||
| } |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.