Skip to content

Added test for negation pattern in sync include exclude section - #1637

Merged
andrewnester merged 6 commits into
mainfrom
fix/include-negation
Jul 31, 2024
Merged

Added test for negation pattern in sync include exclude section#1637
andrewnester merged 6 commits into
mainfrom
fix/include-negation

Conversation

@andrewnester

Copy link
Copy Markdown
Contributor

Changes

Added test for negation pattern in sync include exclude section

Comment threadbundle/config/validate/validate_sync_patterns.go Outdated
Comment threadbundle/config/validate/validate_sync_patterns.go Outdated
Comment threadlibs/sync/sync_test.go Outdated
err = createFile(sub2, "g.go")
require.NoError(t, err)

err = createFile(sub2, "h.txt")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd recommend creating these files and directories using for loops, to make the code terser.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@shreyas-goenka we can't really because we need predictable structure and the files are located in different subdirectories so using loops will make it even less readable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you think about simplifying it like this? The file tree structure is a lot more evident in this case.

for p in {
[]string{dir, "a.go"},
[]string{dir, "b.go"},
...
[]string{dir, ".databricks", "e.go"}
...
[]string{dir, "test", "sub1", "f.go"}
} {
testutil.Touch(t, p...)
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yes, that's a good one, thanks!

Comment threadlibs/sync/sync_test.go Outdated
Comment threadbundle/tests/sync_include_exclude_no_matches_test.go
Comment threadbundle/config/validate/validate_sync_patterns.go Outdated

@shreyas-goenkashreyas-goenka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, looks good to me! Approving to unblock.

Comment threadbundle/config/validate/validate_sync_patterns.go Outdated
@andrewnester
andrewnester added this pull request to the merge queueJul 31, 2024
Merged via the queue into main with commit 1fb8e32Jul 31, 2024
@andrewnester
andrewnester deleted the fix/include-negation branch July 31, 2024 13:52
andrewnester added a commit that referenced this pull request Jul 31, 2024
Bundles:
* Add resource for UC schemas to DABs ([#1413](#1413)).
Internal:
* Use dynamic walking to validate unique resource keys ([#1614](#1614)).
* Regenerate TF schema ([#1635](#1635)).
* Add upgrade and upgrade eager flags to pip install call ([#1636](#1636)).
* Added test for negation pattern in sync include exclude section ([#1637](#1637)).
* Use precomputed terraform plan for `bundle deploy` ([#1640](#1640)).
@andrewnesterandrewnester mentioned this pull request Jul 31, 2024
github-merge-queueBot pushed a commit that referenced this pull request Jul 31, 2024
Bundles:
* Add resource for UC schemas to DABs
([#1413](#1413)).
Internal:
* Use dynamic walking to validate unique resource keys
([#1614](#1614)).
* Regenerate TF schema
([#1635](#1635)).
* Add upgrade and upgrade eager flags to pip install call
([#1636](#1636)).
* Added test for negation pattern in sync include exclude section
([#1637](#1637)).
* Use precomputed terraform plan for `bundle deploy`
([#1640](#1640)).
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
Added test for negation pattern in sync include exclude section
denik pushed a commit that referenced this pull request May 20, 2026
Bundles:
* Add resource for UC schemas to DABs
([#1413](#1413)).
Internal:
* Use dynamic walking to validate unique resource keys
([#1614](#1614)).
* Regenerate TF schema
([#1635](#1635)).
* Add upgrade and upgrade eager flags to pip install call
([#1636](#1636)).
* Added test for negation pattern in sync include exclude section
([#1637](#1637)).
* Use precomputed terraform plan for `bundle deploy`
([#1640](#1640)).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@andrewnester@shreyas-goenka