[#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:
parent
6c21e2cc28
commit
2404a267b9
2 changed files with 44 additions and 31 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue