go.mod: github.com/stretchr/testify v1.8.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
2b4f830ede
commit
535ef5054d
2
go.mod
2
go.mod
@ -55,7 +55,7 @@ require (
|
|||||||
github.com/pelletier/go-toml v1.9.5
|
github.com/pelletier/go-toml v1.9.5
|
||||||
github.com/prometheus/client_golang v1.14.0
|
github.com/prometheus/client_golang v1.14.0
|
||||||
github.com/sirupsen/logrus v1.9.0
|
github.com/sirupsen/logrus v1.9.0
|
||||||
github.com/stretchr/testify v1.8.1
|
github.com/stretchr/testify v1.8.2
|
||||||
github.com/tchap/go-patricia/v2 v2.3.1
|
github.com/tchap/go-patricia/v2 v2.3.1
|
||||||
github.com/urfave/cli v1.22.12
|
github.com/urfave/cli v1.22.12
|
||||||
github.com/vishvananda/netlink v1.2.1-beta.2
|
github.com/vishvananda/netlink v1.2.1-beta.2
|
||||||
|
3
go.sum
3
go.sum
@ -934,8 +934,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
|
||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
|
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||||
|
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||||
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
|
@ -15,7 +15,7 @@ require (
|
|||||||
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
|
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
|
||||||
github.com/opencontainers/runtime-spec v1.1.0-rc.1
|
github.com/opencontainers/runtime-spec v1.1.0-rc.1
|
||||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||||
github.com/stretchr/testify v1.8.1
|
github.com/stretchr/testify v1.8.2
|
||||||
go.opentelemetry.io/otel v1.12.0
|
go.opentelemetry.io/otel v1.12.0
|
||||||
go.opentelemetry.io/otel/sdk v1.12.0
|
go.opentelemetry.io/otel/sdk v1.12.0
|
||||||
golang.org/x/sys v0.6.0
|
golang.org/x/sys v0.6.0
|
||||||
|
@ -1326,8 +1326,9 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
|
||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
|
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||||
|
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=
|
github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=
|
||||||
|
78
vendor/github.com/stretchr/testify/assert/assertions.go
generated
vendored
78
vendor/github.com/stretchr/testify/assert/assertions.go
generated
vendored
@ -8,7 +8,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
@ -141,12 +140,11 @@ func CallerInfo() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parts := strings.Split(file, "/")
|
parts := strings.Split(file, "/")
|
||||||
file = parts[len(parts)-1]
|
|
||||||
if len(parts) > 1 {
|
if len(parts) > 1 {
|
||||||
|
filename := parts[len(parts)-1]
|
||||||
dir := parts[len(parts)-2]
|
dir := parts[len(parts)-2]
|
||||||
if (dir != "assert" && dir != "mock" && dir != "require") || file == "mock_test.go" {
|
if (dir != "assert" && dir != "mock" && dir != "require") || filename == "mock_test.go" {
|
||||||
path, _ := filepath.Abs(file)
|
callers = append(callers, fmt.Sprintf("%s:%d", file, line))
|
||||||
callers = append(callers, fmt.Sprintf("%s:%d", path, line))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,7 +528,7 @@ func isNil(object interface{}) bool {
|
|||||||
[]reflect.Kind{
|
[]reflect.Kind{
|
||||||
reflect.Chan, reflect.Func,
|
reflect.Chan, reflect.Func,
|
||||||
reflect.Interface, reflect.Map,
|
reflect.Interface, reflect.Map,
|
||||||
reflect.Ptr, reflect.Slice},
|
reflect.Ptr, reflect.Slice, reflect.UnsafePointer},
|
||||||
kind)
|
kind)
|
||||||
|
|
||||||
if isNilableKind && value.IsNil() {
|
if isNilableKind && value.IsNil() {
|
||||||
@ -818,49 +816,44 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok
|
|||||||
return true // we consider nil to be equal to the nil set
|
return true // we consider nil to be equal to the nil set
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
|
||||||
if e := recover(); e != nil {
|
|
||||||
ok = false
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
listKind := reflect.TypeOf(list).Kind()
|
listKind := reflect.TypeOf(list).Kind()
|
||||||
subsetKind := reflect.TypeOf(subset).Kind()
|
|
||||||
|
|
||||||
if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map {
|
if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map {
|
||||||
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subsetKind := reflect.TypeOf(subset).Kind()
|
||||||
if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map {
|
if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map {
|
||||||
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
subsetValue := reflect.ValueOf(subset)
|
|
||||||
if subsetKind == reflect.Map && listKind == reflect.Map {
|
if subsetKind == reflect.Map && listKind == reflect.Map {
|
||||||
listValue := reflect.ValueOf(list)
|
subsetMap := reflect.ValueOf(subset)
|
||||||
subsetKeys := subsetValue.MapKeys()
|
actualMap := reflect.ValueOf(list)
|
||||||
|
|
||||||
for i := 0; i < len(subsetKeys); i++ {
|
for _, k := range subsetMap.MapKeys() {
|
||||||
subsetKey := subsetKeys[i]
|
ev := subsetMap.MapIndex(k)
|
||||||
subsetElement := subsetValue.MapIndex(subsetKey).Interface()
|
av := actualMap.MapIndex(k)
|
||||||
listElement := listValue.MapIndex(subsetKey).Interface()
|
|
||||||
|
|
||||||
if !ObjectsAreEqual(subsetElement, listElement) {
|
if !av.IsValid() {
|
||||||
return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", list, subsetElement), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...)
|
||||||
|
}
|
||||||
|
if !ObjectsAreEqual(ev.Interface(), av.Interface()) {
|
||||||
|
return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < subsetValue.Len(); i++ {
|
subsetList := reflect.ValueOf(subset)
|
||||||
element := subsetValue.Index(i).Interface()
|
for i := 0; i < subsetList.Len(); i++ {
|
||||||
|
element := subsetList.Index(i).Interface()
|
||||||
ok, found := containsElement(list, element)
|
ok, found := containsElement(list, element)
|
||||||
if !ok {
|
if !ok {
|
||||||
return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", list), msgAndArgs...)
|
||||||
}
|
}
|
||||||
if !found {
|
if !found {
|
||||||
return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", list, element), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, element), msgAndArgs...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -879,34 +872,28 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{})
|
|||||||
return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...)
|
return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
|
||||||
if e := recover(); e != nil {
|
|
||||||
ok = false
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
listKind := reflect.TypeOf(list).Kind()
|
listKind := reflect.TypeOf(list).Kind()
|
||||||
subsetKind := reflect.TypeOf(subset).Kind()
|
|
||||||
|
|
||||||
if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map {
|
if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map {
|
||||||
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subsetKind := reflect.TypeOf(subset).Kind()
|
||||||
if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map {
|
if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map {
|
||||||
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
subsetValue := reflect.ValueOf(subset)
|
|
||||||
if subsetKind == reflect.Map && listKind == reflect.Map {
|
if subsetKind == reflect.Map && listKind == reflect.Map {
|
||||||
listValue := reflect.ValueOf(list)
|
subsetMap := reflect.ValueOf(subset)
|
||||||
subsetKeys := subsetValue.MapKeys()
|
actualMap := reflect.ValueOf(list)
|
||||||
|
|
||||||
for i := 0; i < len(subsetKeys); i++ {
|
for _, k := range subsetMap.MapKeys() {
|
||||||
subsetKey := subsetKeys[i]
|
ev := subsetMap.MapIndex(k)
|
||||||
subsetElement := subsetValue.MapIndex(subsetKey).Interface()
|
av := actualMap.MapIndex(k)
|
||||||
listElement := listValue.MapIndex(subsetKey).Interface()
|
|
||||||
|
|
||||||
if !ObjectsAreEqual(subsetElement, listElement) {
|
if !av.IsValid() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if !ObjectsAreEqual(ev.Interface(), av.Interface()) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -914,8 +901,9 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{})
|
|||||||
return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < subsetValue.Len(); i++ {
|
subsetList := reflect.ValueOf(subset)
|
||||||
element := subsetValue.Index(i).Interface()
|
for i := 0; i < subsetList.Len(); i++ {
|
||||||
|
element := subsetList.Index(i).Interface()
|
||||||
ok, found := containsElement(list, element)
|
ok, found := containsElement(list, element)
|
||||||
if !ok {
|
if !ok {
|
||||||
return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...)
|
return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...)
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -399,7 +399,7 @@ github.com/spf13/pflag
|
|||||||
# github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980
|
# github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980
|
||||||
## explicit
|
## explicit
|
||||||
github.com/stefanberger/go-pkcs11uri
|
github.com/stefanberger/go-pkcs11uri
|
||||||
# github.com/stretchr/testify v1.8.1
|
# github.com/stretchr/testify v1.8.2
|
||||||
## explicit; go 1.13
|
## explicit; go 1.13
|
||||||
github.com/stretchr/testify/assert
|
github.com/stretchr/testify/assert
|
||||||
github.com/stretchr/testify/require
|
github.com/stretchr/testify/require
|
||||||
|
Loading…
Reference in New Issue
Block a user