-
Notifications
You must be signed in to change notification settings - Fork 99
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
fix: ignore deleted directories not part of a stack in change detection #287
Conversation
b9ac89e
to
1036aa7
Compare
Codecov Report
@@ Coverage Diff @@
## main #287 +/- ##
==========================================
+ Coverage 63.97% 64.05% +0.08%
==========================================
Files 31 31
Lines 5984 5984
==========================================
+ Hits 3828 3833 +5
+ Misses 1944 1939 -5
Partials 212 212
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
LGTM + some possible small improvements on the tests
cmd/terramate/e2etests/list_test.go
Outdated
assertRun(t, cli.listChangedStacks()) | ||
} | ||
|
||
func TestListChangedDontIgnoreStackDeletedFilesInGitDiff(t *testing.T) { |
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.
func TestListChangedDontIgnoreStackDeletedFilesInGitDiff(t *testing.T) { | |
func TestListChangedDetectsDeletedStackSubdirFiles(t *testing.T) { |
cmd/terramate/e2etests/list_test.go
Outdated
git.Add(".") | ||
git.Commit("all") |
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.
git.Add(".") | |
git.Commit("all") | |
git.CommitAll("all") |
cmd/terramate/e2etests/list_test.go
Outdated
}) | ||
} | ||
|
||
func TestListChangedDontIgnoreStackDeletedDirectoriesInGitDiff(t *testing.T) { |
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.
func TestListChangedDontIgnoreStackDeletedDirectoriesInGitDiff(t *testing.T) { | |
func TestListChangedDetectsDeletedStackSubdir(t *testing.T) { |
cmd/terramate/e2etests/list_test.go
Outdated
git.Add(".") | ||
git.Commit("all") |
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.
git.Add(".") | |
git.Commit("all") | |
git.CommitAll("all") |
cmd/terramate/e2etests/list_test.go
Outdated
git.Add(".") | ||
git.Commit("removed directory") |
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.
git.Add(".") | |
git.Commit("removed directory") | |
git.CommitAll("removed directory") |
cmd/terramate/e2etests/list_test.go
Outdated
git.Add(".") | ||
git.Commit("removed file") |
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.
git.Add(".") | |
git.Commit("removed file") | |
git.CommitAll("removed file") |
cmd/terramate/e2etests/list_test.go
Outdated
git.Add(".") | ||
git.Commit("removed stack") |
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.
git.Add(".") | |
git.Commit("removed stack") | |
git.CommitAll("removed stack") |
cmd/terramate/e2etests/list_test.go
Outdated
git.Add(".") | ||
git.Commit("all") |
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.
git.Add(".") | |
git.Commit("all") | |
git.CommitAll("all") |
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.
LGTM + possible small improvements
cmd/terramate/e2etests/list_test.go
Outdated
git := s.Git() | ||
git.CommitAll("all") | ||
git.Push("main") | ||
git.CheckoutNew("deleted-file") |
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.
git.CheckoutNew("deleted-file") | |
git.CheckoutNew("deleted-dir") |
No description provided.