mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2025-01-31 05:41:41 +03:00
run previously useless test
This commit is contained in:
parent
f9c4a5d462
commit
cd50039247
@ -1,11 +1,15 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"math/rand"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
@ -20,6 +24,15 @@ func (s *MigrationGeneratorSuite) SetupSuite() {
|
||||
s.command = &NewMigrationCommand{Directory: "/tmp"}
|
||||
}
|
||||
|
||||
func (s *MigrationGeneratorSuite) Test_FileExists() {
|
||||
var (
|
||||
seededRand *rand.Rand = rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
notExist = fmt.Sprintf("/tmp/%d", seededRand.Int31())
|
||||
)
|
||||
|
||||
assert.False(s.T(), s.command.FileExists(notExist))
|
||||
}
|
||||
|
||||
func (s *MigrationGeneratorSuite) Test_Execute() {
|
||||
found := false
|
||||
assert.NoError(s.T(), s.command.Execute([]string{}))
|
||||
@ -37,3 +50,7 @@ func (s *MigrationGeneratorSuite) Test_Execute() {
|
||||
|
||||
assert.True(s.T(), found)
|
||||
}
|
||||
|
||||
func Test_MigrationGenerator(t *testing.T) {
|
||||
suite.Run(t, new(MigrationGeneratorSuite))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user