vendor: switch to using go1.11 modules

This commit is contained in:
Nick Craig-Wood 2018-08-28 15:27:07 +01:00
parent 5c75453aba
commit da1682a30e
6142 changed files with 390 additions and 5155875 deletions

View file

@ -1,23 +0,0 @@
package check
import (
"io/ioutil"
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCheckDir(t *testing.T) {
// Path not exist.
assert.Error(t, Dir("/not-exist-dir"))
// Path is not directory.
f, err := ioutil.TempFile(os.TempDir(), "test-check-dir-")
assert.NoError(t, err)
f.Close()
os.Remove(f.Name())
// OK.
assert.NoError(t, Dir(os.TempDir()))
}

View file

@ -1,12 +0,0 @@
package check
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCheckErrorForExit(t *testing.T) {
ErrorForExit("name", nil)
assert.True(t, true)
}

View file

@ -1,16 +0,0 @@
package check
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCheckHostAndPort(t *testing.T) {
assert.False(t, HostAndPort("127.0.0.1:80:90"))
assert.False(t, HostAndPort("127.0.0.1"))
assert.False(t, HostAndPort("mysql"))
assert.False(t, HostAndPort("mysql:mysql"))
assert.True(t, HostAndPort("mysql:3306"))
assert.True(t, HostAndPort("172.16.70.50:6379"))
}

View file

@ -1,27 +0,0 @@
package check
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestStringSliceContains(t *testing.T) {
assert.True(t, StringSliceContains([]string{"1", "2", "3"}, "2"))
assert.False(t, StringSliceContains([]string{"1", "2", "3"}, "4"))
}
func TestIntSliceContains(t *testing.T) {
assert.True(t, IntSliceContains([]int{1, 2, 3, 4, 5, 6}, 4))
assert.False(t, IntSliceContains([]int{1, 2, 3, 4, 5, 6}, 7))
}
func TestInt32SliceContains(t *testing.T) {
assert.True(t, Int32SliceContains([]int32{1, 2, 3, 4, 5, 6}, 4))
assert.False(t, Int32SliceContains([]int32{1, 2, 3, 4, 5, 6}, 7))
}
func TestInt64SliceContains(t *testing.T) {
assert.True(t, Int64SliceContains([]int64{1, 2, 3, 4, 5, 6}, 4))
assert.False(t, Int64SliceContains([]int64{1, 2, 3, 4, 5, 6}, 7))
}