server_test.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. package grpc
  2. import (
  3. "context"
  4. "flag"
  5. "fmt"
  6. "github.com/smartystreets/goconvey/convey"
  7. "go-common/app/service/main/relation/model"
  8. "os"
  9. "testing"
  10. "time"
  11. "go-common/app/service/main/relation/api"
  12. pb "go-common/app/service/main/relation/api"
  13. "go-common/app/service/main/relation/conf"
  14. "go-common/app/service/main/relation/service"
  15. "go-common/library/net/rpc/warden"
  16. xtime "go-common/library/time"
  17. )
  18. var (
  19. cli api.RelationClient
  20. svr *service.Service
  21. )
  22. func TestMain(m *testing.M) {
  23. if os.Getenv("DEPLOY_ENV") != "" {
  24. flag.Set("app_id", "main.account.relation-service")
  25. flag.Set("conf_token", "8hm3I5rWzuhChxrBI6VTqmCs7TpJwFhO")
  26. flag.Set("tree_id", "2139")
  27. flag.Set("conf_version", "docker-1")
  28. flag.Set("deploy_env", "uat")
  29. flag.Set("conf_host", "config.bilibili.co")
  30. flag.Set("conf_path", "/tmp")
  31. flag.Set("region", "sh")
  32. flag.Set("zone", "sh001")
  33. }
  34. flag.Parse()
  35. if err := conf.Init(); err != nil {
  36. panic(err)
  37. }
  38. svr = service.New(conf.Conf)
  39. cfg := &warden.ClientConfig{
  40. Dial: xtime.Duration(time.Second * 3),
  41. Timeout: xtime.Duration(time.Second * 3),
  42. }
  43. var err error
  44. cli, err = api.NewClient(cfg)
  45. if err != nil {
  46. panic(err)
  47. }
  48. m.Run()
  49. os.Exit(0)
  50. }
  51. func TestServerRelation(t *testing.T) {
  52. var (
  53. c = context.Background()
  54. )
  55. convey.Convey("Relation", t, func(cv convey.C) {
  56. rr := pb.RelationReq{Mid: 1, Fid: 2, RealIp: "127.0.0.1"}
  57. fr, err := cli.Relation(c, &rr)
  58. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  59. cv.So(err, convey.ShouldBeNil)
  60. cv.So(fr, convey.ShouldNotBeNil)
  61. })
  62. fmt.Println(fr)
  63. f, err2 := svr.Relation(c, 1, 2)
  64. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  65. cv.So(err2, convey.ShouldBeNil)
  66. cv.So(f, convey.ShouldNotBeNil)
  67. })
  68. fmt.Println(f)
  69. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  70. cv.So(f.Mid, convey.ShouldEqual, fr.Mid)
  71. cv.So(f.Attribute, convey.ShouldEqual, fr.Attribute)
  72. cv.So(f.CTime, convey.ShouldEqual, fr.CTime)
  73. })
  74. })
  75. }
  76. func TestServerRelations(t *testing.T) {
  77. var (
  78. c = context.Background()
  79. )
  80. convey.Convey("Relations", t, func(cv convey.C) {
  81. rr := pb.RelationsReq{Mid: 1, Fid: []int64{2, 3}, RealIp: "127.0.0.1"}
  82. fr, err := cli.Relations(c, &rr)
  83. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  84. cv.So(err, convey.ShouldBeNil)
  85. cv.So(fr, convey.ShouldNotBeNil)
  86. })
  87. fmt.Println(fr)
  88. f, err2 := svr.Relations(c, 1, []int64{2, 3})
  89. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  90. cv.So(err2, convey.ShouldBeNil)
  91. cv.So(f, convey.ShouldNotBeNil)
  92. })
  93. fmt.Println(f)
  94. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  95. f1 := fr.FollowingMap[2]
  96. cv.So(f[2].Attribute, convey.ShouldEqual, f1.Attribute)
  97. cv.So(f[2].CTime, convey.ShouldEqual, f1.CTime)
  98. })
  99. })
  100. }
  101. func TestServerStat(t *testing.T) {
  102. var (
  103. c = context.Background()
  104. )
  105. convey.Convey("Stat", t, func(cv convey.C) {
  106. st, err := cli.Stat(c, &pb.MidReq{Mid: 2})
  107. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  108. cv.So(err, convey.ShouldBeNil)
  109. cv.So(st, convey.ShouldNotBeNil)
  110. })
  111. fmt.Println(st)
  112. s, err2 := svr.Stat(c, 2)
  113. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  114. cv.So(err2, convey.ShouldBeNil)
  115. cv.So(s, convey.ShouldNotBeNil)
  116. })
  117. fmt.Println(s)
  118. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  119. cv.So(st.CTime, convey.ShouldEqual, s.CTime)
  120. cv.So(st.Mid, convey.ShouldEqual, s.Mid)
  121. cv.So(st.Black, convey.ShouldEqual, s.Black)
  122. cv.So(st.Follower, convey.ShouldEqual, s.Follower)
  123. cv.So(st.Following, convey.ShouldEqual, s.Following)
  124. cv.So(st.MTime, convey.ShouldEqual, s.MTime)
  125. cv.So(st.Whisper, convey.ShouldEqual, s.Whisper)
  126. })
  127. })
  128. }
  129. func TestServerStats(t *testing.T) {
  130. var (
  131. c = context.Background()
  132. )
  133. convey.Convey("Stats", t, func(cv convey.C) {
  134. st, err := cli.Stats(c, &pb.MidsReq{Mids: []int64{2, 3}, RealIp: "127.0.0.1"})
  135. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  136. cv.So(err, convey.ShouldBeNil)
  137. cv.So(st, convey.ShouldNotBeNil)
  138. })
  139. fmt.Println(st)
  140. s, err2 := svr.Stats(c, []int64{2, 3})
  141. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  142. cv.So(err2, convey.ShouldBeNil)
  143. cv.So(s, convey.ShouldNotBeNil)
  144. })
  145. fmt.Println(s)
  146. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  147. st2 := st.StatReplyMap[2]
  148. s2 := s[2]
  149. cv.So(s2.CTime, convey.ShouldEqual, st2.CTime)
  150. cv.So(s2.Mid, convey.ShouldEqual, st2.Mid)
  151. cv.So(s2.Black, convey.ShouldEqual, st2.Black)
  152. cv.So(s2.Follower, convey.ShouldEqual, st2.Follower)
  153. cv.So(s2.Following, convey.ShouldEqual, st2.Following)
  154. cv.So(s2.MTime, convey.ShouldEqual, st2.MTime)
  155. cv.So(s2.Whisper, convey.ShouldEqual, st2.Whisper)
  156. })
  157. })
  158. }
  159. func TestServerAttentions(t *testing.T) {
  160. var (
  161. c = context.Background()
  162. )
  163. convey.Convey("Attentions", t, func(cv convey.C) {
  164. at, err := cli.Attentions(c, &pb.MidReq{Mid: 2})
  165. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  166. cv.So(err, convey.ShouldBeNil)
  167. cv.So(at, convey.ShouldNotBeNil)
  168. })
  169. fmt.Println(at)
  170. a, err2 := svr.Attentions(c, 2)
  171. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  172. cv.So(err2, convey.ShouldBeNil)
  173. cv.So(a, convey.ShouldNotBeNil)
  174. })
  175. fmt.Println(a)
  176. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  177. f1 := at.FollowingList[0]
  178. f2 := a[0]
  179. cv.So(f1.Mid, convey.ShouldEqual, f2.Mid)
  180. cv.So(f1.Attribute, convey.ShouldEqual, f2.Attribute)
  181. cv.So(f1.CTime, convey.ShouldEqual, f2.CTime)
  182. })
  183. })
  184. }
  185. func TestServerFollowings(t *testing.T) {
  186. var (
  187. c = context.Background()
  188. )
  189. convey.Convey("Followings", t, func(cv convey.C) {
  190. at, err := cli.Followings(c, &pb.MidReq{Mid: 2})
  191. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  192. cv.So(err, convey.ShouldBeNil)
  193. cv.So(at, convey.ShouldNotBeNil)
  194. })
  195. fmt.Println(at)
  196. a, err2 := svr.Followings(c, 2)
  197. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  198. cv.So(err2, convey.ShouldBeNil)
  199. cv.So(a, convey.ShouldNotBeNil)
  200. })
  201. fmt.Println(a)
  202. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  203. f1 := at.FollowingList[0]
  204. f2 := a[0]
  205. cv.So(f1.Mid, convey.ShouldEqual, f2.Mid)
  206. cv.So(f1.Attribute, convey.ShouldEqual, f2.Attribute)
  207. cv.So(f1.CTime, convey.ShouldEqual, f2.CTime)
  208. })
  209. })
  210. }
  211. func TestServerWhispers(t *testing.T) {
  212. var (
  213. c = context.Background()
  214. )
  215. convey.Convey("Whispers", t, func(cv convey.C) {
  216. at, err := cli.Whispers(c, &pb.MidReq{Mid: 2231365})
  217. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  218. cv.So(err, convey.ShouldBeNil)
  219. cv.So(at, convey.ShouldNotBeNil)
  220. })
  221. fmt.Println(at)
  222. a, err2 := svr.Whispers(c, 2231365)
  223. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  224. cv.So(err2, convey.ShouldBeNil)
  225. cv.So(a, convey.ShouldNotBeNil)
  226. })
  227. fmt.Println(a)
  228. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  229. f1 := at.FollowingList[0]
  230. f2 := a[0]
  231. cv.So(f1.Mid, convey.ShouldEqual, f2.Mid)
  232. cv.So(f1.Attribute, convey.ShouldEqual, f2.Attribute)
  233. cv.So(f1.CTime, convey.ShouldEqual, f2.CTime)
  234. })
  235. })
  236. }
  237. func TestServerFollowers(t *testing.T) {
  238. var (
  239. c = context.Background()
  240. )
  241. convey.Convey("Followers", t, func(cv convey.C) {
  242. at, err := cli.Followers(c, &pb.MidReq{Mid: 2})
  243. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  244. cv.So(err, convey.ShouldBeNil)
  245. cv.So(at, convey.ShouldNotBeNil)
  246. })
  247. fmt.Println(at)
  248. a, err2 := svr.Followers(c, 2)
  249. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  250. cv.So(err2, convey.ShouldBeNil)
  251. cv.So(a, convey.ShouldNotBeNil)
  252. })
  253. fmt.Println(a)
  254. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  255. f1 := at.FollowingList[0]
  256. f2 := a[0]
  257. cv.So(f1.Mid, convey.ShouldEqual, f2.Mid)
  258. cv.So(f1.Attribute, convey.ShouldEqual, f2.Attribute)
  259. cv.So(f1.CTime, convey.ShouldEqual, f2.CTime)
  260. })
  261. })
  262. }
  263. func TestServerTag(t *testing.T) {
  264. var (
  265. c = context.Background()
  266. )
  267. convey.Convey("Tag", t, func(cv convey.C) {
  268. t, err := cli.Tag(c, &pb.TagIdReq{Mid: 1, TagId: -10, RealIp: "127.0.0.1"})
  269. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  270. cv.So(err, convey.ShouldBeNil)
  271. cv.So(t, convey.ShouldNotBeNil)
  272. })
  273. fmt.Println(t)
  274. tg, err2 := svr.Tag(c, 1, -10, "127.0.0.1")
  275. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  276. cv.So(err2, convey.ShouldBeNil)
  277. cv.So(tg, convey.ShouldNotBeNil)
  278. })
  279. fmt.Println(tg)
  280. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  281. cv.So(len(t.Mids), convey.ShouldEqual, len(tg))
  282. cv.So(t.Mids[0], convey.ShouldEqual, tg[0])
  283. })
  284. })
  285. }
  286. func TestServerTags(t *testing.T) {
  287. var (
  288. c = context.Background()
  289. )
  290. convey.Convey("Tags", t, func(cv convey.C) {
  291. t, err := cli.Tags(c, &pb.MidReq{Mid: 1})
  292. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  293. cv.So(err, convey.ShouldBeNil)
  294. cv.So(t, convey.ShouldNotBeNil)
  295. })
  296. fmt.Println(t)
  297. tg, err2 := svr.Tags(c, 1, "127.0.0.1")
  298. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  299. cv.So(err2, convey.ShouldBeNil)
  300. cv.So(tg, convey.ShouldNotBeNil)
  301. })
  302. fmt.Println(tg)
  303. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  304. cv.So(t.TagCountList[0].Tagid, convey.ShouldEqual, tg[0].Tagid)
  305. cv.So(t.TagCountList[0].Count, convey.ShouldEqual, tg[0].Count)
  306. cv.So(t.TagCountList[0].Name, convey.ShouldEqual, tg[0].Name)
  307. })
  308. })
  309. }
  310. func TestUserTag(t *testing.T) {
  311. var (
  312. c = context.Background()
  313. )
  314. convey.Convey("UserTag", t, func(cv convey.C) {
  315. tt, err := cli.UserTag(c, &pb.RelationReq{Mid: 1, Fid: 2, RealIp: "127.0.0.1"})
  316. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  317. cv.So(err, convey.ShouldBeNil)
  318. cv.So(tt, convey.ShouldNotBeNil)
  319. })
  320. fmt.Println(tt)
  321. tg, err2 := svr.UserTag(c, 1, 2, "127.0.0.1")
  322. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  323. cv.So(err2, convey.ShouldBeNil)
  324. cv.So(tg, convey.ShouldNotBeNil)
  325. })
  326. fmt.Println(tg)
  327. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  328. cv.So(len(tt.Tags), convey.ShouldEqual, len(tg))
  329. })
  330. })
  331. }
  332. func TestSpecial(t *testing.T) {
  333. var (
  334. c = context.Background()
  335. )
  336. convey.Convey("Special", t, func(cv convey.C) {
  337. s, err := cli.Special(c, &pb.MidReq{Mid: 1})
  338. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  339. cv.So(err, convey.ShouldBeNil)
  340. cv.So(s, convey.ShouldNotBeNil)
  341. })
  342. fmt.Println(s)
  343. sg, err2 := svr.Special(c, 1)
  344. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  345. cv.So(err2, convey.ShouldBeNil)
  346. cv.So(sg, convey.ShouldNotBeNil)
  347. })
  348. fmt.Println(sg)
  349. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  350. cv.So(len(sg), convey.ShouldEqual, len(s.Mids))
  351. })
  352. })
  353. }
  354. func TestFollowersUnread(t *testing.T) {
  355. var (
  356. c = context.Background()
  357. )
  358. convey.Convey("FollowersUnread", t, func(cv convey.C) {
  359. s, err := cli.FollowersUnread(c, &pb.MidReq{Mid: 1})
  360. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  361. cv.So(err, convey.ShouldBeNil)
  362. cv.So(s, convey.ShouldNotBeNil)
  363. })
  364. fmt.Println(s)
  365. h, err2 := svr.Unread(c, 1)
  366. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  367. cv.So(err2, convey.ShouldBeNil)
  368. cv.So(h, convey.ShouldNotBeNil)
  369. })
  370. fmt.Println(h)
  371. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  372. cv.So(s.HasUnread, convey.ShouldEqual, h)
  373. })
  374. })
  375. }
  376. func TestFollowersUnreadCount(t *testing.T) {
  377. var (
  378. c = context.Background()
  379. )
  380. convey.Convey("FollowersUnreadCount", t, func(cv convey.C) {
  381. s, err := cli.FollowersUnreadCount(c, &pb.MidReq{Mid: 1})
  382. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  383. cv.So(err, convey.ShouldBeNil)
  384. cv.So(s, convey.ShouldNotBeNil)
  385. })
  386. fmt.Println(s)
  387. h, err2 := svr.UnreadCount(c, 1)
  388. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  389. cv.So(err2, convey.ShouldBeNil)
  390. cv.So(h, convey.ShouldNotBeNil)
  391. })
  392. fmt.Println(h)
  393. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  394. cv.So(s.UnreadCount, convey.ShouldEqual, h)
  395. })
  396. })
  397. }
  398. func TestAchieveGet(t *testing.T) {
  399. var (
  400. c = context.Background()
  401. )
  402. convey.Convey("FollowersUnreadCount", t, func(cv convey.C) {
  403. s, err := cli.AchieveGet(c, &pb.AchieveGetReq{Award: "10k", Mid: 3})
  404. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  405. cv.So(err, convey.ShouldBeNil)
  406. cv.So(s, convey.ShouldNotBeNil)
  407. })
  408. fmt.Println(s)
  409. s2, err := cli.Achieve(c, &pb.AchieveReq{AwardToken: s.AwardToken})
  410. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  411. cv.So(err, convey.ShouldBeNil)
  412. cv.So(s2, convey.ShouldNotBeNil)
  413. })
  414. fmt.Println(s2)
  415. h, err2 := svr.AchieveGet(c, &model.ArgAchieveGet{Award: "10k", Mid: 3})
  416. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  417. cv.So(err2, convey.ShouldBeNil)
  418. cv.So(h, convey.ShouldNotBeNil)
  419. })
  420. fmt.Println(h)
  421. h2, err2 := svr.Achieve(c, &model.ArgAchieve{AwardToken: h.AwardToken})
  422. cv.Convey("Then err should be nil reslut should not be nil. ", func(cv convey.C) {
  423. cv.So(err2, convey.ShouldBeNil)
  424. cv.So(h2, convey.ShouldNotBeNil)
  425. })
  426. fmt.Println(h2)
  427. cv.Convey("Then err should be nil reslut should not be nil.", func(cv convey.C) {
  428. cv.So(s2.Mid, convey.ShouldEqual, h2.Mid)
  429. cv.So(s2.Award, convey.ShouldEqual, h2.Award)
  430. })
  431. })
  432. }
  433. func TestFollowerNotifySetting(t *testing.T) {
  434. var (
  435. c = context.Background()
  436. )
  437. convey.Convey("FollowerNotifySetting", t, func(cv convey.C) {
  438. s, err := cli.FollowerNotifySetting(c, &pb.MidReq{Mid: 3})
  439. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  440. cv.So(err, convey.ShouldBeNil)
  441. cv.So(s, convey.ShouldNotBeNil)
  442. })
  443. fmt.Println(s)
  444. h, err2 := svr.FollowerNotifySetting(c, &model.ArgMid{Mid: 3})
  445. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  446. cv.So(err2, convey.ShouldBeNil)
  447. cv.So(h, convey.ShouldNotBeNil)
  448. })
  449. fmt.Println(h)
  450. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  451. cv.So(s.Mid, convey.ShouldEqual, h.Mid)
  452. cv.So(s.Enabled, convey.ShouldEqual, h.Enabled)
  453. })
  454. })
  455. }
  456. func TestSameFollowings(t *testing.T) {
  457. var (
  458. c = context.Background()
  459. )
  460. convey.Convey("SameFollowings", t, func(cv convey.C) {
  461. s, err := cli.SameFollowings(c, &pb.SameFollowingReq{Mid: 3, Mid2: 4})
  462. cv.Convey("Then err should be nil.reslut should not be nil.", func(cv convey.C) {
  463. cv.So(err, convey.ShouldBeNil)
  464. cv.So(s, convey.ShouldNotBeNil)
  465. })
  466. fmt.Println(s)
  467. h, err2 := svr.SameFollowings(c, &model.ArgSameFollowing{Mid1: 3, Mid2: 4})
  468. cv.Convey("Then err should be nil. reslut should not be nil.", func(cv convey.C) {
  469. cv.So(err2, convey.ShouldBeNil)
  470. cv.So(h, convey.ShouldNotBeNil)
  471. })
  472. fmt.Println(h)
  473. cv.Convey("the grpc result should be equal to service result", func(cv convey.C) {
  474. cv.So(len(s.FollowingList), convey.ShouldEqual, len(h))
  475. f1 := s.FollowingList[0]
  476. f2 := h[0]
  477. cv.So(f1.Mid, convey.ShouldEqual, f2.Mid)
  478. cv.So(f1.MTime, convey.ShouldEqual, f2.MTime)
  479. cv.So(f1.CTime, convey.ShouldEqual, f2.CTime)
  480. cv.So(f1.Attribute, convey.ShouldEqual, f2.Attribute)
  481. cv.So(f1.Source, convey.ShouldEqual, f2.Source)
  482. cv.So(f1.Special, convey.ShouldEqual, f2.Special)
  483. })
  484. })
  485. }