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

Feat: add flag to not override existing tags #218

Merged
merged 2 commits into from
Mar 24, 2025
Merged

Conversation

TomerHeber
Copy link
Collaborator

@TomerHeber TomerHeber commented Mar 23, 2025

  1. Added a new flag.
  2. The flag flips the merge function order. The order of merge dictates whether it overrides existing tags or not.
  3. Added a unit test.

resolves #217

@TomerHeber TomerHeber self-assigned this Mar 23, 2025
"github.com/stretchr/testify/assert"
)

func TestTagBlock_MergeOrder(t *testing.T) {
Copy link
Collaborator Author

@TomerHeber TomerHeber Mar 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to add it as unit test.
much cleaner than running an integration test.
I tested it manually to ensure it's working as expected from a terraform/tofu perspective. (Which is expected - but wanted to be sure).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not both?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked, it will be a lot of work since very specific and UT should be enough

Copy link
Member

@eranelbaz eranelbaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all looks good
just why only UT?

"github.com/stretchr/testify/assert"
)

func TestTagBlock_MergeOrder(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not both?

@eranelbaz eranelbaz merged commit c8cb389 into master Mar 24, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flag to not override existing tags
2 participants