update
This commit is contained in:
@@ -1,87 +0,0 @@
|
||||
package sources_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"goyomi/internal/source"
|
||||
"goyomi/sources/en/kaizenscan"
|
||||
"goyomi/sources/en/kewnscans"
|
||||
"goyomi/sources/en/lunatoons"
|
||||
"goyomi/sources/en/mistscans"
|
||||
"goyomi/sources/en/necroscans"
|
||||
"goyomi/sources/en/nyanukafe"
|
||||
"goyomi/sources/en/sirenscans"
|
||||
)
|
||||
|
||||
type smokeCase struct {
|
||||
name string
|
||||
mode string
|
||||
kotlinRef string
|
||||
newSource func() source.CatalogueSource
|
||||
}
|
||||
|
||||
func TestStandaloneKeyoappSmoke(t *testing.T) {
|
||||
if os.Getenv("GOYOMI_SMOKE") != "1" {
|
||||
t.Skip("set GOYOMI_SMOKE=1 to run live source smoke tests")
|
||||
}
|
||||
|
||||
tests := []smokeCase{
|
||||
{
|
||||
name: "en/kaizenscan",
|
||||
mode: "plain_http",
|
||||
kotlinRef: "extensions-source/src/en/kaizenscan/.../KaizenScan.kt",
|
||||
newSource: func() source.CatalogueSource { return kaizenscan.New() },
|
||||
},
|
||||
{
|
||||
name: "en/kewnscans",
|
||||
mode: "plain_http",
|
||||
kotlinRef: "extensions-source/src/en/kewnscans/.../KewnScans.kt",
|
||||
newSource: func() source.CatalogueSource { return kewnscans.New() },
|
||||
},
|
||||
{
|
||||
name: "en/lunatoons",
|
||||
mode: "plain_http",
|
||||
kotlinRef: "extensions-source/src/en/lunatoons/.../LunaToons.kt",
|
||||
newSource: func() source.CatalogueSource { return lunatoons.New() },
|
||||
},
|
||||
{
|
||||
name: "en/mistscans",
|
||||
mode: "plain_http",
|
||||
kotlinRef: "extensions-source/src/en/mistscans/.../MistScans.kt",
|
||||
newSource: func() source.CatalogueSource { return mistscans.New() },
|
||||
},
|
||||
{
|
||||
name: "en/necroscans",
|
||||
mode: "plain_http",
|
||||
kotlinRef: "extensions-source/src/en/necroscans/.../NecroScans.kt",
|
||||
newSource: func() source.CatalogueSource { return necroscans.New() },
|
||||
},
|
||||
{
|
||||
name: "en/nyanukafe",
|
||||
mode: "plain_http",
|
||||
kotlinRef: "extensions-source/src/en/nyanukafe/.../NyanuKafe.kt",
|
||||
newSource: func() source.CatalogueSource { return nyanukafe.New() },
|
||||
},
|
||||
{
|
||||
name: "en/sirenscans",
|
||||
mode: "plain_http",
|
||||
kotlinRef: "extensions-source/src/en/sirenscans/.../SirenScans.kt",
|
||||
newSource: func() source.CatalogueSource { return sirenscans.New() },
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
s := tc.newSource()
|
||||
mp, err := s.GetPopularManga(1)
|
||||
if err != nil {
|
||||
t.Fatalf("mode=%s kotlin=%s popular failed: %v", tc.mode, tc.kotlinRef, err)
|
||||
}
|
||||
if len(mp.Mangas) == 0 {
|
||||
t.Fatalf("mode=%s kotlin=%s popular returned 0 mangas", tc.mode, tc.kotlinRef)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user