Skip to content
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

Update overrides section behavior in imports and inline #1122

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e87e944
updates
aknysh Feb 25, 2025
2e57423
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Feb 26, 2025
9018295
updates
aknysh Feb 26, 2025
5c12452
updates
aknysh Feb 27, 2025
33b3cad
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Feb 28, 2025
8103901
updates
aknysh Feb 28, 2025
180e9a9
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Feb 28, 2025
a0230c8
updates
aknysh Feb 28, 2025
d3ec699
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 1, 2025
4afa07c
updates
aknysh Mar 1, 2025
9c05401
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 1, 2025
3213361
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 1, 2025
7a3b0e6
updates
aknysh Mar 1, 2025
3ab1324
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 3, 2025
a0abd71
updates
aknysh Mar 3, 2025
d2ac755
updates
aknysh Mar 3, 2025
dbae24c
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 4, 2025
60c79e2
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 5, 2025
83dcb7d
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 5, 2025
b7fd479
updates
aknysh Mar 5, 2025
dfd7810
updates
aknysh Mar 6, 2025
a78edea
updates
aknysh Mar 6, 2025
ba71825
updates
aknysh Mar 6, 2025
6d1ceea
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 6, 2025
7fc7609
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 6, 2025
7b8a753
Merge remote-tracking branch 'refs/remotes/origin/main' into update-o…
aknysh Mar 7, 2025
6b04e9d
updates
aknysh Mar 8, 2025
13ccd7a
updates
aknysh Mar 8, 2025
96fc196
updates
aknysh Mar 8, 2025
815a0b3
updates
aknysh Mar 8, 2025
0cf449a
add unit tests
aknysh Mar 9, 2025
6ef13c4
add unit tests
aknysh Mar 10, 2025
bb7e0e9
add unit tests
aknysh Mar 10, 2025
ea8edbb
add unit tests
aknysh Mar 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cmd/about.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package cmd
import (
_ "embed"

"github.com/cloudposse/atmos/pkg/utils"
"github.com/spf13/cobra"

"github.com/cloudposse/atmos/pkg/utils"
)

//go:embed markdown/about.md
Expand All @@ -17,7 +18,7 @@ var aboutCmd = &cobra.Command{
Long: `Display information about Atmos, its features, and benefits.`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
utils.PrintfMarkdown(aboutMarkdown)
utils.PrintfMarkdown("%s", aboutMarkdown)
return nil
},
}
Expand Down
35 changes: 35 additions & 0 deletions cmd/about_test.go
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")
}
5 changes: 3 additions & 2 deletions cmd/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package cmd
import (
_ "embed"

"github.com/cloudposse/atmos/pkg/utils"
"github.com/spf13/cobra"

"github.com/cloudposse/atmos/pkg/utils"
)

//go:embed markdown/support.md
Expand All @@ -20,7 +21,7 @@ var supportCmd = &cobra.Command{
SilenceUsage: true,
SilenceErrors: true,
RunE: func(cmd *cobra.Command, args []string) error {
utils.PrintfMarkdown(supportMarkdown)
utils.PrintfMarkdown("%s", supportMarkdown)
return nil
},
}
Expand Down
35 changes: 35 additions & 0 deletions cmd/support_test.go
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(aboutCmd, []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")
}
2 changes: 1 addition & 1 deletion examples/quick-start-advanced/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG GEODESIC_OS=debian
# https://atmos.tools/
# https://github.com/cloudposse/atmos
# https://github.com/cloudposse/atmos/releases
ARG ATMOS_VERSION=1.164.0
ARG ATMOS_VERSION=1.165.3

# Terraform: https://github.com/hashicorp/terraform/releases
ARG TF_VERSION=1.5.7
Expand Down
69 changes: 34 additions & 35 deletions go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading