mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(tests): add Parallelization where possible (#1823)
* feat(tests): add Parallelization where possible
This commit is contained in:
parent
c0882aff84
commit
4cc0f9cc83
18 changed files with 53 additions and 2 deletions
|
@ -14,6 +14,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_service_parseMacros(t *testing.T) {
|
func Test_service_parseMacros(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
release domain.Release
|
release domain.Release
|
||||||
action *domain.Action
|
action *domain.Action
|
||||||
|
@ -67,6 +68,7 @@ func Test_service_parseMacros(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_service_execCmd(t *testing.T) {
|
func Test_service_execCmd(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
release domain.Release
|
release domain.Release
|
||||||
action *domain.Action
|
action *domain.Action
|
||||||
|
|
|
@ -13,6 +13,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAppConfig_processLines(t *testing.T) {
|
func TestAppConfig_processLines(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields struct {
|
type fields struct {
|
||||||
Config *domain.Config
|
Config *domain.Config
|
||||||
m *sync.Mutex
|
m *sync.Mutex
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDownloadClient_qbitBuildLegacyHost(t *testing.T) {
|
func TestDownloadClient_qbitBuildLegacyHost(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields struct {
|
type fields struct {
|
||||||
ID int32
|
ID int32
|
||||||
Name string
|
Name string
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFilter_CheckFilter(t *testing.T) {
|
func TestFilter_CheckFilter(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
filter Filter
|
filter Filter
|
||||||
rejectionReasons *RejectionReasons
|
rejectionReasons *RejectionReasons
|
||||||
|
@ -1443,6 +1444,7 @@ func TestFilter_CheckFilter(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFilter_CheckFilter1(t *testing.T) {
|
func TestFilter_CheckFilter1(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields Filter
|
type fields Filter
|
||||||
type args struct {
|
type args struct {
|
||||||
r *Release
|
r *Release
|
||||||
|
@ -2069,6 +2071,7 @@ func TestFilter_CheckFilter1(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_containsMatch(t *testing.T) {
|
func Test_containsMatch(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tags []string
|
tags []string
|
||||||
filters []string
|
filters []string
|
||||||
|
@ -2092,6 +2095,7 @@ func Test_containsMatch(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_containsAllMatch(t *testing.T) {
|
func Test_containsAllMatch(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tags []string
|
tags []string
|
||||||
filters []string
|
filters []string
|
||||||
|
@ -2117,6 +2121,7 @@ func Test_containsAllMatch(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_contains(t *testing.T) {
|
func Test_contains(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tag string
|
tag string
|
||||||
filter string
|
filter string
|
||||||
|
@ -2144,6 +2149,7 @@ func Test_contains(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_containsSlice(t *testing.T) {
|
func Test_containsSlice(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tag string
|
tag string
|
||||||
filters []string
|
filters []string
|
||||||
|
@ -2166,6 +2172,7 @@ func Test_containsSlice(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_containsAny(t *testing.T) {
|
func Test_containsAny(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tags []string
|
tags []string
|
||||||
filter string
|
filter string
|
||||||
|
@ -2187,6 +2194,7 @@ func Test_containsAny(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_containsAll(t *testing.T) {
|
func Test_containsAll(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tags []string
|
tags []string
|
||||||
filter string
|
filter string
|
||||||
|
@ -2212,6 +2220,7 @@ func Test_containsAll(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_sliceContainsSlice(t *testing.T) {
|
func Test_sliceContainsSlice(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tags []string
|
tags []string
|
||||||
filters []string
|
filters []string
|
||||||
|
@ -2235,6 +2244,7 @@ func Test_sliceContainsSlice(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_containsIntStrings(t *testing.T) {
|
func Test_containsIntStrings(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
value int
|
value int
|
||||||
filterList string
|
filterList string
|
||||||
|
@ -2262,6 +2272,7 @@ func Test_containsIntStrings(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_matchRegex(t *testing.T) {
|
func Test_matchRegex(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tag string
|
tag string
|
||||||
filter string
|
filter string
|
||||||
|
@ -2289,6 +2300,7 @@ func Test_matchRegex(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_validation(t *testing.T) {
|
func Test_validation(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
filter Filter
|
filter Filter
|
||||||
|
@ -2308,6 +2320,7 @@ func Test_validation(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_checkSizeFilter(t *testing.T) {
|
func Test_checkSizeFilter(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
filter Filter
|
filter Filter
|
||||||
|
@ -2338,6 +2351,7 @@ func Test_checkSizeFilter(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_containsFuzzy(t *testing.T) {
|
func Test_containsFuzzy(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tag string
|
tag string
|
||||||
filter string
|
filter string
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIndexerIRCParseMatch_ParseUrls(t *testing.T) {
|
func TestIndexerIRCParseMatch_ParseUrls(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields struct {
|
type fields struct {
|
||||||
TorrentURL string
|
TorrentURL string
|
||||||
TorrentName string
|
TorrentName string
|
||||||
|
@ -165,6 +166,7 @@ func TestIndexerIRCParseMatch_ParseUrls(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIndexerIRCParseMatch_ParseTorrentName(t *testing.T) {
|
func TestIndexerIRCParseMatch_ParseTorrentName(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields struct {
|
type fields struct {
|
||||||
TorrentURL string
|
TorrentURL string
|
||||||
TorrentName string
|
TorrentName string
|
||||||
|
@ -238,6 +240,7 @@ func TestIndexerIRCParseMatch_ParseTorrentName(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIRCParserGazelleGames_Parse(t *testing.T) {
|
func TestIRCParserGazelleGames_Parse(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
rls *Release
|
rls *Release
|
||||||
vars map[string]string
|
vars map[string]string
|
||||||
|
@ -316,6 +319,7 @@ func TestIRCParserGazelleGames_Parse(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIRCParserOrpheus_Parse(t *testing.T) {
|
func TestIRCParserOrpheus_Parse(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
rls *Release
|
rls *Release
|
||||||
vars map[string]string
|
vars map[string]string
|
||||||
|
|
|
@ -12,6 +12,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMacros_Parse(t *testing.T) {
|
func TestMacros_Parse(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
currentTime := time.Now()
|
currentTime := time.Now()
|
||||||
|
|
||||||
type fields struct {
|
type fields struct {
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRejectionReasons_String(t *testing.T) {
|
func TestRejectionReasons_String(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields struct {
|
type fields struct {
|
||||||
data []Rejection
|
data []Rejection
|
||||||
}
|
}
|
||||||
|
@ -55,6 +56,7 @@ func TestRejectionReasons_String(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRejectionReasons_StringTruncated(t *testing.T) {
|
func TestRejectionReasons_StringTruncated(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields struct {
|
type fields struct {
|
||||||
data []Rejection
|
data []Rejection
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseReleaseTags(t *testing.T) {
|
func TestParseReleaseTags(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tags []string
|
tags []string
|
||||||
}
|
}
|
||||||
|
@ -29,6 +30,7 @@ func TestParseReleaseTags(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestParseReleaseTagString(t *testing.T) {
|
func TestParseReleaseTagString(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tags string
|
tags string
|
||||||
}
|
}
|
||||||
|
@ -64,6 +66,7 @@ func TestParseReleaseTagString(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_cleanReleaseTags(t *testing.T) {
|
func Test_cleanReleaseTags(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
tagString string
|
tagString string
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRSSJob_processItem(t *testing.T) {
|
func TestRSSJob_processItem(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
nowMinusTime := time.Now().Add(time.Duration(-3000) * time.Second)
|
nowMinusTime := time.Now().Add(time.Duration(-3000) * time.Second)
|
||||||
|
|
||||||
|
@ -234,6 +235,7 @@ func TestRSSJob_processItem(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_isMaxAge(t *testing.T) {
|
func Test_isMaxAge(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
maxAge int
|
maxAge int
|
||||||
item time.Time
|
item time.Time
|
||||||
|
|
|
@ -92,6 +92,7 @@ func setupAuthHandler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAuthHandlerLogin(t *testing.T) {
|
func TestAuthHandlerLogin(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
logger := zerolog.Nop()
|
logger := zerolog.Nop()
|
||||||
encoder := encoder{}
|
encoder := encoder{}
|
||||||
cookieStore := sessions.NewCookieStore([]byte("test"))
|
cookieStore := sessions.NewCookieStore([]byte("test"))
|
||||||
|
@ -153,6 +154,7 @@ func TestAuthHandlerLogin(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAuthHandlerValidateOK(t *testing.T) {
|
func TestAuthHandlerValidateOK(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
logger := zerolog.Nop()
|
logger := zerolog.Nop()
|
||||||
encoder := encoder{}
|
encoder := encoder{}
|
||||||
cookieStore := sessions.NewCookieStore([]byte("test"))
|
cookieStore := sessions.NewCookieStore([]byte("test"))
|
||||||
|
@ -224,6 +226,7 @@ func TestAuthHandlerValidateOK(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAuthHandlerValidateBad(t *testing.T) {
|
func TestAuthHandlerValidateBad(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
logger := zerolog.Nop()
|
logger := zerolog.Nop()
|
||||||
encoder := encoder{}
|
encoder := encoder{}
|
||||||
cookieStore := sessions.NewCookieStore([]byte("test"))
|
cookieStore := sessions.NewCookieStore([]byte("test"))
|
||||||
|
@ -271,6 +274,7 @@ func TestAuthHandlerValidateBad(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAuthHandlerLoginBad(t *testing.T) {
|
func TestAuthHandlerLoginBad(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
logger := zerolog.Nop()
|
logger := zerolog.Nop()
|
||||||
encoder := encoder{}
|
encoder := encoder{}
|
||||||
cookieStore := sessions.NewCookieStore([]byte("test"))
|
cookieStore := sessions.NewCookieStore([]byte("test"))
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestYamlExpectations(t *testing.T) {
|
func TestYamlExpectations(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
s := &service{definitions: map[string]domain.IndexerDefinition{}}
|
s := &service{definitions: map[string]domain.IndexerDefinition{}}
|
||||||
err := s.LoadIndexerDefinitions()
|
err := s.LoadIndexerDefinitions()
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIndexersParseAndFilter(t *testing.T) {
|
func TestIndexersParseAndFilter(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields struct {
|
type fields struct {
|
||||||
identifier string
|
identifier string
|
||||||
identifierExternal string
|
identifierExternal string
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSanitizeLogFile(t *testing.T) {
|
func TestSanitizeLogFile(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
name string
|
name string
|
||||||
input string
|
input string
|
||||||
|
|
|
@ -4,13 +4,15 @@
|
||||||
package notification
|
package notification
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/autobrr/autobrr/internal/domain"
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/autobrr/autobrr/internal/domain"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNotificationBuilderPlainText_BuildBody(t *testing.T) {
|
func TestNotificationBuilderPlainText_BuildBody(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type args struct {
|
type args struct {
|
||||||
payload domain.NotificationPayload
|
payload domain.NotificationPayload
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCreateHash(t *testing.T) {
|
func TestCreateHash(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
hashRX, err := regexp.Compile(`^\$argon2id\$v=19\$m=65536,t=1,p=2\$[A-Za-z0-9+/]{22}\$[A-Za-z0-9+/]{43}$`)
|
hashRX, err := regexp.Compile(`^\$argon2id\$v=19\$m=65536,t=1,p=2\$[A-Za-z0-9+/]{22}\$[A-Za-z0-9+/]{43}$`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -35,6 +36,7 @@ func TestCreateHash(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestComparePasswordAndHash(t *testing.T) {
|
func TestComparePasswordAndHash(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
hash, err := CreateHash("pa$$word", DefaultParams)
|
hash, err := CreateHash("pa$$word", DefaultParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -60,6 +62,7 @@ func TestComparePasswordAndHash(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDecodeHash(t *testing.T) {
|
func TestDecodeHash(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
hash, err := CreateHash("pa$$word", DefaultParams)
|
hash, err := CreateHash("pa$$word", DefaultParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -75,6 +78,7 @@ func TestDecodeHash(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCheckHash(t *testing.T) {
|
func TestCheckHash(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
hash, err := CreateHash("pa$$word", DefaultParams)
|
hash, err := CreateHash("pa$$word", DefaultParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -93,6 +97,7 @@ func TestCheckHash(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestStrictDecoding(t *testing.T) {
|
func TestStrictDecoding(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
// "bug" valid hash: $argon2id$v=19$m=65536,t=1,p=2$UDk0zEuIzbt0x3bwkf8Bgw$ihSfHWUJpTgDvNWiojrgcN4E0pJdUVmqCEdRZesx9tE
|
// "bug" valid hash: $argon2id$v=19$m=65536,t=1,p=2$UDk0zEuIzbt0x3bwkf8Bgw$ihSfHWUJpTgDvNWiojrgcN4E0pJdUVmqCEdRZesx9tE
|
||||||
ok, _, err := CheckHash("bug", "$argon2id$v=19$m=65536,t=1,p=2$UDk0zEuIzbt0x3bwkf8Bgw$ihSfHWUJpTgDvNWiojrgcN4E0pJdUVmqCEdRZesx9tE")
|
ok, _, err := CheckHash("bug", "$argon2id$v=19$m=65536,t=1,p=2$UDk0zEuIzbt0x3bwkf8Bgw$ihSfHWUJpTgDvNWiojrgcN4E0pJdUVmqCEdRZesx9tE")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStringAndFilterString(t *testing.T) {
|
func TestStringAndFilterString(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
input string
|
input string
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGitHubReleaseChecker_checkNewVersion(t *testing.T) {
|
func TestGitHubReleaseChecker_checkNewVersion(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
type fields struct {
|
type fields struct {
|
||||||
Repo string
|
Repo string
|
||||||
}
|
}
|
||||||
|
@ -112,6 +113,7 @@ func TestGitHubReleaseChecker_checkNewVersion(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_isDevelop(t *testing.T) {
|
func Test_isDevelop(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
version string
|
version string
|
||||||
|
|
|
@ -15,6 +15,7 @@ import (
|
||||||
// A '*' in a provided string will not result in matching the strings before and after the '*' of the string provided.
|
// A '*' in a provided string will not result in matching the strings before and after the '*' of the string provided.
|
||||||
// Sample usage: In resource matching for bucket policy validation.
|
// Sample usage: In resource matching for bucket policy validation.
|
||||||
func TestMatch(t *testing.T) {
|
func TestMatch(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
pattern string
|
pattern string
|
||||||
text string
|
text string
|
||||||
|
@ -151,6 +152,7 @@ func TestMatch(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMatchSimple(t *testing.T) {
|
func TestMatchSimple(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
pattern string
|
pattern string
|
||||||
name string
|
name string
|
||||||
|
@ -183,6 +185,7 @@ func TestMatchSimple(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMatchSliceSimple(t *testing.T) {
|
func TestMatchSliceSimple(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
patterns []string
|
patterns []string
|
||||||
name string
|
name string
|
||||||
|
@ -209,6 +212,7 @@ func TestMatchSliceSimple(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMatchSlice(t *testing.T) {
|
func TestMatchSlice(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
patterns []string
|
patterns []string
|
||||||
name string
|
name string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue