Skip to content

Commit c4e3703

Browse files
committed
Remove unused Cleanup method from AofDirectoryCreator
The Cleanup method was never called anywhere in the codebase. AOF test files handle cleanup directly using os.RemoveAll in their teardown functions registered via stageHarness.RegisterTeardownFunc. Additionally, the stageHarness parameter in the method was unused, and the method returned error unlike RDBFileCreator.Cleanup() which returns nothing, creating an inconsistency. This also removes the now-unused test_case_harness import.
1 parent fd70e1f commit c4e3703

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

internal/aof_directory_creator.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
encoder "github.com/codecrafters-io/redis-tester/internal/resp/encoder"
1010
value "github.com/codecrafters-io/redis-tester/internal/resp/value"
1111
"github.com/codecrafters-io/tester-utils/logger"
12-
"github.com/codecrafters-io/tester-utils/test_case_harness"
1312
"github.com/dustin/go-humanize/english"
1413
)
1514

@@ -121,10 +120,6 @@ func (a *AofDirectoryCreator) createManifestFile(logger *logger.Logger, manifest
121120
return nil
122121
}
123122

124-
func (a *AofDirectoryCreator) Cleanup(stageHarness *test_case_harness.TestCaseHarness) error {
125-
return os.RemoveAll(filepath.Join(a.DataDirectory, a.AppendDirName))
126-
}
127-
128123
func (a *AofDirectoryCreator) verifyMemberValues() {
129124
if a.DataDirectory == "" {
130125
panic("Codecrafters Internal Error - DataDirectory cannot be empty in AofDirectoryCreator")

0 commit comments

Comments
 (0)