gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcb78a1a0cb78a1a0HM65 report missing heap diagnostic package with repromrecb78a1a0/tests/seed-franchises.hl

2.3 KB

  1. // tests/seed-franchises.hl — GATE FIXTURE for tracker.worldapi.org#19 (mission 066, tests/franchises.mjs): movies with TMDB ids
  2. // for the collection seed, written into the gate's storage AFTER tests/seed-show.hl, before the server starts. What the fake TMDB
  3. // says about them (tests/franchises.mjs):
  4. // 9101 Gate Alien (1979), 9102 Gate Aliens (1986), 9103 Gate Alien 3 (1992) → collection 900 "Gate Alien Collection", whose
  5. // parts come OUT of release order, with a part we don't have (9999) and an ADULT one we have (9105, adult = true: never
  6. // asked, never in the timeline)
  7. // 9104 Gate Loner (2000) → collection 901, its only part we have → no timeline
  8. // 9106 Gate Standalone (2001) → no collection
  9. // 9107 Gate Missing (2002) → TMDB answers 404
  10. // Self-assigned ids, one put() each (never update(), see seed-show.hl).
  11. import { MPackDB } from 'hl:mpackdb'
  12. import { env } from 'hl:proc'
  13. storageDir = env('TRACKER_STORAGE')
  14. if (storageDir == null || !storageDir.startsWith('/')) { hlError('set TRACKER_STORAGE, absolute') }
  15. showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])
  16. movie = (id, tmdbId, title, release, slug, adult) => {
  17. showsTable.put({
  18. adult = adult id = id title = title summary = null tmdbSummary = null tmdbId = tmdbId
  19. language = 'en' type = 'movie' release = release year = toNumber(release.slice(0, 4)) image = null urlSegment = slug
  20. episodesCount = null homepage = null imdbId = null seasonsCount = null status = 'Released' tagline = null
  21. tvdbId = null tvmzId = null genres = [] cast = [] seasons = [] oldId = 'fr-' + tmdbId
  22. })
  23. return true
  24. }
  25. movie('fr0000000000f101', 9101, 'Gate Alien', '1979-05-25', 'gate-alien', false)
  26. movie('fr0000000000f102', 9102, 'Gate Aliens', '1986-07-18', 'gate-aliens', false)
  27. movie('fr0000000000f103', 9103, 'Gate Alien 3', '1992-05-22', 'gate-alien-3', false)
  28. movie('fr0000000000f104', 9104, 'Gate Loner', '2000-01-01', 'gate-loner', false)
  29. movie('fr0000000000f105', 9105, 'Gate Adult Alien', '1990-01-01', 'gate-adult-alien', true)
  30. movie('fr0000000000f106', 9106, 'Gate Standalone', '2001-01-01', 'gate-standalone', false)
  31. movie('fr0000000000f107', 9107, 'Gate Missing', '2002-01-01', 'gate-missing', false)
  32. showsTable.persist()
  33. console.log('seed-franchises: 7 movies')

Branches

Latest commits

  • cb78a1a0HM65 report missing heap diagnostic package with repromre
  • 89606a5cHM65 briefmre
  • 096ce0d4log: DP69 live on day48mre
  • b3d8a80bDP69 brief, RV48 mergedmre
  • ce6d7d32Merge rv48: Hybriel day48mre
  • 3da2ea86RV48: report day48 cold starts, gates and cleanupmre
  • 8d9ecdfeRV48: re-vendor Hybriel set day48 (source b6a8f429, bin 660a9524)mre
  • 4a802ae7status: RV48 runningmre
  • 0a5412b6RV48 brief, day48 outmre
  • 56665efelog: CB69 mergedmre
  • 05448a98Merge cb69-imports: appTitle in a dependency-free topicmre
  • e55b379dKeep shared app title independent of the route import graphmre
  • 9a99659blog: hybriel#334, batch waits for day48mre
  • 85fa6c9blog: CB68 result, CB69 startedmre
  • 2f07c1b7log: DP68 boot gate failed, CB68mre
  • 9652782dlog: HM59 merged, DP68 startedmre
  • 29867a75Merge hm59-logic: tracker#59 page logic moved to libmre
  • f7bfe90bMove remaining page builders into their topicsmre
  • 7c3991f9log: day46 from Antonmre
  • ec54fc35Move show page logic into the shows topicmre