Skip to content

Commit

Permalink
refactor code, ignore TestRecord.md.tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Feb 2, 2023
1 parent 7366b88 commit c67cf55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ fabric.properties
# Dependency directories (remove the comment below to include it)
# vendor/
TestRecord
**/TestRecord.md.tmp
3 changes: 1 addition & 2 deletions e2etest.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ func tearDown(t *testing.T, rootDir string, modulePath string) {
if t.Failed() {
s = FailedTestVersionSnapshot(rootDir, modulePath, "")
}
err := s.Save(t)
require.NoError(t, err)
require.NoError(t, s.Save(t))
}

func initAndApply(t terratest.TestingT, options *terraform.Options) string {
Expand Down
6 changes: 6 additions & 0 deletions version_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ func TestVersionSnapshotToString(t *testing.T) {
}

func TestOutputNewTestVersionSnapshot(t *testing.T) {
defer func() {
err := os.RemoveAll("TestRecord")
if err != nil {
println(err.Error())
}
}()
localPath := filepath.Join("example", "basic", "TestRecord.md.tmp")
defer func() { _ = os.Remove(localPath) }()
uploadPath := filepath.Join("TestRecord", "basic", "TestRecord.md.tmp")
Expand Down

0 comments on commit c67cf55

Please sign in to comment.