Refactor all tests to use the MemoryLeakTestSuite.

This commit is contained in:
Maximilian Paß
2023-09-05 16:11:06 +02:00
parent e3161637a9
commit 3abd4d9a3d
30 changed files with 1012 additions and 759 deletions

View File

@@ -3,6 +3,7 @@ package nullio
import (
"bytes"
"context"
"github.com/openHPI/poseidon/tests"
"github.com/stretchr/testify/suite"
"testing"
)
@@ -12,12 +13,13 @@ func TestLs2JsonTestSuite(t *testing.T) {
}
type Ls2JsonTestSuite struct {
suite.Suite
tests.MemoryLeakTestSuite
buf *bytes.Buffer
writer *Ls2JsonWriter
}
func (s *Ls2JsonTestSuite) SetupTest() {
s.MemoryLeakTestSuite.SetupTest()
s.buf = &bytes.Buffer{}
s.writer = &Ls2JsonWriter{Target: s.buf, Ctx: context.Background()}
}