-
Notifications
You must be signed in to change notification settings - Fork 71
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
Added test for negation pattern in sync include exclude section #1637
Conversation
libs/sync/sync_test.go
Outdated
@@ -67,6 +67,9 @@ func setupFiles(t *testing.T) string { | |||
err = createFile(sub2, "g.go") | |||
require.NoError(t, err) | |||
|
|||
err = createFile(sub2, "h.txt") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...)
}
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
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)).
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)).
Changes
Added test for negation pattern in sync include exclude section