2017-06-14 20:13:30 +00:00
|
|
|
package main
|
|
|
|
|
2017-06-30 16:12:14 +00:00
|
|
|
var routeTests = map[string][]string{
|
2017-06-14 20:13:30 +00:00
|
|
|
// User
|
2017-06-21 18:33:57 +00:00
|
|
|
"/user/:nick": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/+Akyoto",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/user/:nick/threads": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/+Akyoto/threads",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-23 15:15:48 +00:00
|
|
|
"/user/:nick/posts": []string{
|
|
|
|
"/+Akyoto/posts",
|
|
|
|
},
|
|
|
|
|
2017-07-16 05:50:57 +00:00
|
|
|
"/user/:nick/soundtracks": []string{
|
|
|
|
"/+Akyoto/soundtracks",
|
2017-06-30 16:12:14 +00:00
|
|
|
},
|
|
|
|
|
2017-10-01 05:24:56 +00:00
|
|
|
"/user/:nick/followers": []string{
|
|
|
|
"/+Akyoto/followers",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/stats": []string{
|
|
|
|
"/+Akyoto/stats",
|
|
|
|
},
|
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/user/:nick/animelist": []string{
|
2017-06-20 12:16:23 +00:00
|
|
|
"/+Akyoto/animelist",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-20 12:16:23 +00:00
|
|
|
|
2017-07-05 19:23:59 +00:00
|
|
|
"/user/:nick/animelist/anime/:id": []string{
|
2017-10-02 00:06:59 +00:00
|
|
|
"/+Akyoto/animelist/anime/7929",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-20 12:16:23 +00:00
|
|
|
|
2017-07-05 19:23:59 +00:00
|
|
|
"/user/:nick/animelist/watching": []string{
|
|
|
|
"/+Akyoto/animelist/watching",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/animelist/completed": []string{
|
|
|
|
"/+Akyoto/animelist/completed",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/animelist/planned": []string{
|
|
|
|
"/+Akyoto/animelist/planned",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/animelist/hold": []string{
|
|
|
|
"/+Akyoto/animelist/hold",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/user/:nick/animelist/dropped": []string{
|
|
|
|
"/+Akyoto/animelist/dropped",
|
|
|
|
},
|
|
|
|
|
2017-06-14 20:13:30 +00:00
|
|
|
// Pages
|
2017-06-21 18:33:57 +00:00
|
|
|
"/anime/:id": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/anime/1",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-07-10 14:58:34 +00:00
|
|
|
"/thread/:id": []string{
|
|
|
|
"/thread/HJgS7c2K",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-07-10 14:58:34 +00:00
|
|
|
"/post/:id": []string{
|
|
|
|
"/post/B1RzshnK",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/forum/:tag": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/forum/general",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/search/:term": []string{
|
2017-06-21 00:02:30 +00:00
|
|
|
"/search/Dragon Ball",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-21 00:02:30 +00:00
|
|
|
|
2017-07-16 05:50:57 +00:00
|
|
|
"/soundtrack/:id": []string{
|
|
|
|
"/soundtrack/h0ac8sKkg",
|
2017-06-30 16:12:14 +00:00
|
|
|
},
|
|
|
|
|
2017-10-01 05:24:56 +00:00
|
|
|
"/character/:id": []string{
|
|
|
|
"/character/6556",
|
|
|
|
},
|
|
|
|
|
2017-06-14 20:13:30 +00:00
|
|
|
// API
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/anime/:id": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/api/anime/1",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/thread/:id": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/api/thread/HJgS7c2K",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/post/:id": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/api/post/B1RzshnK",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/animelist/:id": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/api/animelist/4J6qpK1ve",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-23 15:15:48 +00:00
|
|
|
"/api/animelist/:id/get/:item": []string{
|
|
|
|
"/api/animelist/4J6qpK1ve/get/7929",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/animelist/:id/get/:item/:property": []string{
|
|
|
|
"/api/animelist/4J6qpK1ve/get/7929/Episodes",
|
|
|
|
},
|
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/settings/:id": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/api/settings/4J6qpK1ve",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/user/:id": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/api/user/4J6qpK1ve",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/emailtouser/:id": []string{
|
2017-06-16 22:33:27 +00:00
|
|
|
"/api/emailtouser/e.urbach@gmail.com",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-16 22:33:27 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/googletouser/:id": []string{
|
2017-06-16 22:33:27 +00:00
|
|
|
"/api/googletouser/106530160120373282283",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-16 22:33:27 +00:00
|
|
|
|
2017-07-03 20:50:04 +00:00
|
|
|
"/api/facebooktouser/:id": []string{
|
|
|
|
"/api/facebooktouser/10207576239700188",
|
|
|
|
},
|
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/nicktouser/:id": []string{
|
2017-06-16 22:33:27 +00:00
|
|
|
"/api/nicktouser/Akyoto",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-16 22:33:27 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/api/searchindex/:id": []string{
|
2017-06-21 00:02:30 +00:00
|
|
|
"/api/searchindex/Anime",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-21 00:02:30 +00:00
|
|
|
|
2017-06-30 16:12:14 +00:00
|
|
|
"/api/analytics/:id": []string{
|
|
|
|
"/api/analytics/4J6qpK1ve",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/soundtrack/:id": []string{
|
|
|
|
"/api/soundtrack/h0ac8sKkg",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/soundcloudtosoundtrack/:id": []string{
|
|
|
|
"/api/soundcloudtosoundtrack/145918628",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/youtubetosoundtrack/:id": []string{
|
|
|
|
"/api/youtubetosoundtrack/hU2wqJuOIp4",
|
|
|
|
},
|
|
|
|
|
2017-10-01 05:24:56 +00:00
|
|
|
"/api/userfollows/:id": []string{
|
|
|
|
"/api/userfollows/4J6qpK1ve",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/anilisttoanime/:id": []string{
|
|
|
|
"/api/anilisttoanime/527",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/animecharacters/:id": []string{
|
|
|
|
"/api/animecharacters/323",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/animeepisodes/:id": []string{
|
|
|
|
"/api/animeepisodes/323",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/character/:id": []string{
|
|
|
|
"/api/character/6556",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/pushsubscriptions/:id": []string{
|
|
|
|
"/api/pushsubscriptions/4J6qpK1ve",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/api/myanimelisttoanime/:id": []string{
|
|
|
|
"/api/myanimelisttoanime/527",
|
|
|
|
},
|
|
|
|
|
2017-06-16 22:33:27 +00:00
|
|
|
// Images
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/avatars/large/:file": []string{
|
2017-06-18 12:52:50 +00:00
|
|
|
"/images/avatars/large/4J6qpK1ve.webp",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-18 12:52:50 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/avatars/small/:file": []string{
|
2017-06-18 12:52:50 +00:00
|
|
|
"/images/avatars/small/4J6qpK1ve.webp",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-18 12:52:50 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/brand/:file": []string{
|
2017-06-18 12:52:50 +00:00
|
|
|
"/images/brand/64.webp",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-16 22:33:27 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/login/:file": []string{
|
2017-06-16 22:33:27 +00:00
|
|
|
"/images/login/google",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-16 22:33:27 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/cover/:file": []string{
|
2017-06-14 20:13:30 +00:00
|
|
|
"/images/cover/default",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-06-21 18:33:57 +00:00
|
|
|
"/images/elements/:file": []string{
|
2017-06-18 12:07:38 +00:00
|
|
|
"/images/elements/no-avatar.svg",
|
2017-06-21 18:33:57 +00:00
|
|
|
},
|
2017-06-14 20:13:30 +00:00
|
|
|
|
2017-10-03 02:24:01 +00:00
|
|
|
// Extra tests for higher coverage
|
|
|
|
"/_/+Akyoto": []string{
|
|
|
|
"/_/+Akyoto",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/_/search/dragon": []string{
|
|
|
|
"/_/search/dragon",
|
|
|
|
},
|
|
|
|
|
|
|
|
"/dark-flame-master": []string{
|
|
|
|
"/dark-flame-master",
|
|
|
|
},
|
|
|
|
|
2017-06-30 16:12:14 +00:00
|
|
|
// Disable these tests because they require authorization
|
2017-10-01 05:24:56 +00:00
|
|
|
"/auth/google": nil,
|
|
|
|
"/auth/google/callback": nil,
|
|
|
|
"/auth/facebook": nil,
|
|
|
|
"/auth/facebook/callback": nil,
|
2017-10-02 04:59:29 +00:00
|
|
|
"/dashboard": nil,
|
2017-10-01 05:24:56 +00:00
|
|
|
"/import": nil,
|
|
|
|
"/import/anilist/animelist": nil,
|
|
|
|
"/import/anilist/animelist/finish": nil,
|
|
|
|
"/import/myanimelist/animelist": nil,
|
|
|
|
"/import/myanimelist/animelist/finish": nil,
|
|
|
|
"/import/kitsu/animelist": nil,
|
|
|
|
"/import/kitsu/animelist/finish": nil,
|
|
|
|
"/api/test/notification": nil,
|
|
|
|
"/api/paypal/payment/create": nil,
|
|
|
|
"/api/userfollows/:id/get/:item": nil,
|
|
|
|
"/api/userfollows/:id/get/:item/:property": nil,
|
|
|
|
"/api/pushsubscriptions/:id/get/:item": nil,
|
|
|
|
"/api/pushsubscriptions/:id/get/:item/:property": nil,
|
|
|
|
"/paypal/success": nil,
|
|
|
|
"/paypal/cancel": nil,
|
|
|
|
"/anime/:id/edit": nil,
|
|
|
|
"/new/thread": nil,
|
|
|
|
"/new/soundtrack": nil,
|
2017-10-02 12:56:51 +00:00
|
|
|
"/admin/anilist": nil,
|
2017-10-02 13:33:39 +00:00
|
|
|
"/admin/shoboi": nil,
|
2017-10-01 05:24:56 +00:00
|
|
|
"/user": nil,
|
|
|
|
"/settings": nil,
|
2017-10-04 06:12:12 +00:00
|
|
|
"/shop": nil,
|
2017-10-06 10:44:55 +00:00
|
|
|
"/shop/history": nil,
|
2017-10-04 06:12:12 +00:00
|
|
|
"/charge": nil,
|
|
|
|
"/inventory": nil,
|
2017-10-01 05:24:56 +00:00
|
|
|
"/extension/embed": nil,
|
2017-06-21 18:33:57 +00:00
|
|
|
}
|