[#1959] neofs-adm: Move testdata generation to a separate function

Later we could make it a separate tests an run neofs-adm tests on CI.

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-10-24 15:41:55 +03:00 committed by fyrchik
parent 6c21e2cc28
commit 2404a267b9
2 changed files with 44 additions and 31 deletions

View file

@ -112,7 +112,7 @@ func setupTestTerminal(t *testing.T) *bytes.Buffer {
}
func newTempDir(t *testing.T) string {
dir := filepath.Join(os.TempDir(), "neofs-adm.test."+strconv.FormatUint(rand.Uint64(), 10))
dir := filepath.Join(t.TempDir(), "neofs-adm.test."+strconv.FormatUint(rand.Uint64(), 10))
require.NoError(t, os.Mkdir(dir, os.ModePerm))
t.Cleanup(func() {
require.NoError(t, os.RemoveAll(dir))