diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-03 21:07:54 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-03 21:10:17 +0000 |
commit | 3fe36471d77d1c4be2a8432cf3a2d4a3f2042f19 (patch) | |
tree | 84aee88d3a94fd8795554aa97478fc70e91f9722 | |
parent | Swap out double quotes for single (diff) | |
download | mythfs-3fe36471d77d1c4be2a8432cf3a2d4a3f2042f19.tar.bz2 mythfs-3fe36471d77d1c4be2a8432cf3a2d4a3f2042f19.tar.xz mythfs-3fe36471d77d1c4be2a8432cf3a2d4a3f2042f19.zip |
Update test fixtures
-rw-r--r-- | mythfs/unittests/Jamfile.jam | 6 | ||||
-rw-r--r-- | mythfs/unittests/fixtures/data.sql | 22 | ||||
-rw-r--r-- | mythfs/unittests/fixtures/schema-min.sql | 10 | ||||
-rw-r--r-- | mythfs/unittests/fixtures/schema.sql | 10 | ||||
-rw-r--r-- | mythfs/unittests/mockDefs.cpp | 2 |
5 files changed, 22 insertions, 28 deletions
diff --git a/mythfs/unittests/Jamfile.jam b/mythfs/unittests/Jamfile.jam index 54ea036..2272766 100644 --- a/mythfs/unittests/Jamfile.jam +++ b/mythfs/unittests/Jamfile.jam @@ -6,11 +6,6 @@ lib dryice : : : : <include>/usr/include/icetray ; path-constant me : . ; -alias test-data : - [ glob-tree *.dat ] - fixtures/schema.sql - ; - lib testCommon : mockDefs.cpp : @@ -49,7 +44,6 @@ run <library>..//boost_filesystem <library>testCommon <library>boost_utf - <dependency>test-data <define>ROOT=\"$(me)\" : testMain ; diff --git a/mythfs/unittests/fixtures/data.sql b/mythfs/unittests/fixtures/data.sql index 55f45aa..444abe1 100644 --- a/mythfs/unittests/fixtures/data.sql +++ b/mythfs/unittests/fixtures/data.sql @@ -20,17 +20,17 @@ -- /*!40000 ALTER TABLE `recorded` DISABLE KEYS */; -INSERT INTO `recorded` VALUES (1004,'2013-03-25 01:49:00','2013-03-25 03:39:11','I\'m Not Scared','(2003) Thriller','Michele,10, lives a carefree life in Italy\'s cornfields until he discovers a boy shackled in an empty house. Befriending him, he doesn\'t realise the danger he is now in.',0,0,'Film','defiant',0,0,0,0,0,'Default',2812,'','www.channel4.com/43559/001','25300','2013-09-29 20:26:39',2323705860,0,0,'0000-00-00',0,735317,0,27,1,0,'1004_20130325014900.mpg','2013-03-25 01:50:00','2013-03-25 03:35:00','Default','Default',1,1,0,'Default','2013-03-25 03:41:01'); -INSERT INTO `recorded` VALUES (1009,'2015-06-13 19:59:00','2015-06-13 21:39:10','Echoes from the Dead','Swedish thriller','A mother returns to the desolate island where she was born to investigate the disappearance of her son 21 years ago. Contains some violence. Also in HD.',0,0,'Film','defiant',0,0,0,1,0,'Default',3358,'','fp.bbc.co.uk/4j63mu','tmdb3.py_196027','2015-06-13 21:39:10',2530997188,0,0,'2013-01-01',0,719528,0,27,1,0,'1009_20150613195900.mpg','2015-06-13 20:00:00','2015-06-13 21:35:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1030,'2015-03-13 20:59:00','2015-03-13 23:04:10','Jackie Chan\'s Forbidden Kingdom','Action adventure','Legends Jet Li and Jackie Chan meet in battle for the first time in this fantasy in which a kung-fu obsessed American teenager goes on a magical journey to ancient China.',0,0,'Film','defiant',0,0,0,1,0,'Default',3250,'','www.five.tv/v6hjv','','2015-03-13 23:04:10',1728827696,0,0,'2008-01-01',0,719528,0,27,1,0,'1030_20150313205900.mpg','2015-03-13 21:00:00','2015-03-13 23:00:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1032,'2015-04-26 18:09:00','2015-04-26 20:04:10','Dragon Wars','','Korean monster movie starring Jason Behr and Amanda Brooks, 2007. A reporter discovers his destiny is to save Los Angeles from a dragon that comes back to life every 500 years',0,0,'Film','defiant',0,0,0,1,0,'Default',3330,'','','tmdb3.py_10253','2015-04-26 20:04:10',1664782112,0,0,'2007-01-01',0,719528,0,27,1,0,'1032_20150426180900.mpg','2015-04-26 18:10:00','2015-04-26 20:00:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1032,'2015-12-11 20:59:00','2015-12-11 22:59:11','Omen IV','The Awakening','Damien may be dead but his spirit lives on in a mysterious girl named Delia who is adopted by two lawyers. They try to find the truth about Delia\'s real parents.',0,0,'Film','defiant',0,0,0,1,0,'Default',3476,'','','','2015-12-11 22:59:11',1493357696,0,0,'1991-01-01',0,719528,0,27,1,0,'1032_20151211205900.mpg','2015-12-11 21:00:00','2015-12-11 22:55:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1001,'2015-12-20 23:39:00','2015-12-21 00:24:10','Have I Got a Bit More News for You','','An extended compilation of the news quiz that looks back at the big news of 2015. With team captains Paul Merton and Ian Hislop, and a variety of guest hosts and panellists. Also in HD.',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',598,'fp.bbc.co.uk/nf5h3i','fp.bbc.co.uk/1rkiy1','','2015-12-21 00:24:10',1416394256,0,0,'0000-00-00',0,0,0,27,1,1,'1001_20151220233900.mpg','2015-12-20 23:40:00','2015-12-21 00:20:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1002,'2015-12-20 22:09:00','2015-12-20 22:59:10','Live at the Apollo','Part 0: Christmas Special','Stand-up comedy from the Hammersmith Apollo. In the festive final episode, Nina Conti introduces Tanyalee Davis, Hal Cruttenden and Josh Widdicombe. Also in HD.',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',3471,'fp.bbc.co.uk/nilln9','fp.bbc.co.uk/1rkiv9','ttvdb.py_80905','2015-12-20 22:59:10',1733000732,0,0,'0000-00-00',0,0,0,27,1,0,'1002_20151220220900.mpg','2015-12-20 22:10:00','2015-12-20 22:55:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1002,'2015-12-21 09:34:00','2015-12-21 11:04:11','Flight of the Navigator','Family science fiction adventure','In 1978, a 12-year-old boy takes a tumble and wakes up to find it is 1986. Meanwhile, Nasa scientists discover a mysterious alien spacecraft. Also in HD.',0,0,'Film','defiant',0,0,0,1,0,'Default',3480,'','fp.bbc.co.uk/4j452j','tmdb3.py_10122','2015-12-21 11:04:11',3144665660,0,0,'1986-01-01',0,719528,0,27,1,0,'1002_20151221093400.mpg','2015-12-21 09:35:00','2015-12-21 11:00:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1002,'2015-12-19 22:19:00','2015-12-19 23:09:10','QI XL','Merriment','Stephen Fry enjoys some merriment with Jenny Eclair, Johnny Vegas and Bill Bailey. Contains some strong language. Also in HD.',13,8,'Entertainment','defiant',0,0,0,0,0,'Default',2641,'fp.bbc.co.uk/nb9n2b','fp.bbc.co.uk/1rkhsh','ttvdb.py_72716','2015-12-19 23:09:10',1521299948,0,0,'0000-00-00',0,0,0,27,1,0,'1002_20151219221900.mpg','2015-12-19 22:20:00','2015-12-19 23:05:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1303,'2015-12-02 20:59:00','2015-12-02 23:14:10','Insidious','Chapter 2','Supernatural horror sequel with Patrick Wilson, Rose Byrne and Lin Shaye. Josh is back and Renai remains desperate to prevent the malevolent spirits from haunting her family again.',0,0,'Film','defiant',0,0,0,1,0,'Default',3244,'','www.channel4.com/59556/001','tmdb3.py_49018','2015-12-02 23:14:10',1778673264,0,0,'2013-01-01',0,719528,0,27,1,0,'1303_20151202205900.mpg','2015-12-02 21:00:00','2015-12-02 23:10:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); -INSERT INTO `recorded` VALUES (1004,'2015-12-21 17:59:00','2015-12-21 18:34:10','The Simpsons','The Spy Who "Learned" Me','While he is at home on sick leave, Homer learns how to become a better husband with the help of dashing spy movie crime fighter Stradivarius Cain. (S23 Ep20/22)',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',10,'www.channel4.com/c4ei0041105162151952','www.channel4.com/61647/020','','2015-12-21 18:34:10',613944080,0,0,'0000-00-00',0,0,0,27,1,0,'1004_20151221175900.mpg','2015-12-21 18:00:00','2015-12-21 18:30:00','Default','Default',1,0,0,'Default','0000-00-00 00:00:00'); +INSERT INTO `recorded` VALUES (1004,'2013-03-25 01:49:00','2013-03-25 03:39:11','I''m Not Scared','(2003) Thriller','Michele,10, lives a carefree life in Italy''s cornfields until he discovers a boy shackled in an empty house. Befriending him, he doesn''t realise the danger he is now in.',0,0,'Film','defiant',0,0,0,0,0,'Default',2812,'','www.channel4.com/43559/001','25300','2013-09-29 20:26:39',2323705860,0,0,NULL,0,735317,0,27,1,0,'1004_20130325014900.mpg','2013-03-25 01:50:00','2013-03-25 03:35:00','Default','Default',1,1,0,'Default','2013-03-25 03:41:01'); +INSERT INTO `recorded` VALUES (1009,'2015-06-13 19:59:00','2015-06-13 21:39:10','Echoes from the Dead','Swedish thriller','A mother returns to the desolate island where she was born to investigate the disappearance of her son 21 years ago. Contains some violence. Also in HD.',0,0,'Film','defiant',0,0,0,1,0,'Default',3358,'','fp.bbc.co.uk/4j63mu','tmdb3.py_196027','2015-06-13 21:39:10',2530997188,0,0,'2013-01-01',0,719528,0,27,1,0,'1009_20150613195900.mpg','2015-06-13 20:00:00','2015-06-13 21:35:00','Default','Default',1,0,0,'Default','2015-06-13 21:35:00'); +INSERT INTO `recorded` VALUES (1030,'2015-03-13 20:59:00','2015-03-13 23:04:10','Jackie Chan''s Forbidden Kingdom','Action adventure','Legends Jet Li and Jackie Chan meet in battle for the first time in this fantasy in which a kung-fu obsessed American teenager goes on a magical journey to ancient China.',0,0,'Film','defiant',0,0,0,1,0,'Default',3250,'','www.five.tv/v6hjv','','2015-03-13 23:04:10',1728827696,0,0,'2008-01-01',0,719528,0,27,1,0,'1030_20150313205900.mpg','2015-03-13 21:00:00','2015-03-13 23:00:00','Default','Default',1,0,0,'Default','2015-03-13 23:00:00'); +INSERT INTO `recorded` VALUES (1032,'2015-04-26 18:09:00','2015-04-26 20:04:10','Dragon Wars','','Korean monster movie starring Jason Behr and Amanda Brooks, 2007. A reporter discovers his destiny is to save Los Angeles from a dragon that comes back to life every 500 years',0,0,'Film','defiant',0,0,0,1,0,'Default',3330,'','','tmdb3.py_10253','2015-04-26 20:04:10',1664782112,0,0,'2007-01-01',0,719528,0,27,1,0,'1032_20150426180900.mpg','2015-04-26 18:10:00','2015-04-26 20:00:00','Default','Default',1,0,0,'Default','2015-04-26 20:00:00'); +INSERT INTO `recorded` VALUES (1032,'2015-12-11 20:59:00','2015-12-11 22:59:11','Omen IV','The Awakening','Damien may be dead but his spirit lives on in a mysterious girl named Delia who is adopted by two lawyers. They try to find the truth about Delia''s real parents.',0,0,'Film','defiant',0,0,0,1,0,'Default',3476,'','','','2015-12-11 22:59:11',1493357696,0,0,'1991-01-01',0,719528,0,27,1,0,'1032_20151211205900.mpg','2015-12-11 21:00:00','2015-12-11 22:55:00','Default','Default',1,0,0,'Default','2015-12-11 22:55:00'); +INSERT INTO `recorded` VALUES (1001,'2015-12-20 23:39:00','2015-12-21 00:24:10','Have I Got a Bit More News for You','','An extended compilation of the news quiz that looks back at the big news of 2015. With team captains Paul Merton and Ian Hislop, and a variety of guest hosts and panellists. Also in HD.',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',598,'fp.bbc.co.uk/nf5h3i','fp.bbc.co.uk/1rkiy1','','2015-12-21 00:24:10',1416394256,0,0,NULL,0,0,0,27,1,1,'1001_20151220233900.mpg','2015-12-20 23:40:00','2015-12-21 00:20:00','Default','Default',1,0,0,'Default','2015-12-21 00:20:00'); +INSERT INTO `recorded` VALUES (1002,'2015-12-20 22:09:00','2015-12-20 22:59:10','Live at the Apollo','Part 0: Christmas Special','Stand-up comedy from the Hammersmith Apollo. In the festive final episode, Nina Conti introduces Tanyalee Davis, Hal Cruttenden and Josh Widdicombe. Also in HD.',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',3471,'fp.bbc.co.uk/nilln9','fp.bbc.co.uk/1rkiv9','ttvdb.py_80905','2015-12-20 22:59:10',1733000732,0,0,NULL,0,0,0,27,1,0,'1002_20151220220900.mpg','2015-12-20 22:10:00','2015-12-20 22:55:00','Default','Default',1,0,0,'Default','2015-12-20 22:55:00'); +INSERT INTO `recorded` VALUES (1002,'2015-12-21 09:34:00','2015-12-21 11:04:11','Flight of the Navigator','Family science fiction adventure','In 1978, a 12-year-old boy takes a tumble and wakes up to find it is 1986. Meanwhile, Nasa scientists discover a mysterious alien spacecraft. Also in HD.',0,0,'Film','defiant',0,0,0,1,0,'Default',3480,'','fp.bbc.co.uk/4j452j','tmdb3.py_10122','2015-12-21 11:04:11',3144665660,0,0,'1986-01-01',0,719528,0,27,1,0,'1002_20151221093400.mpg','2015-12-21 09:35:00','2015-12-21 11:00:00','Default','Default',1,0,0,'Default','2015-12-21 11:00:00'); +INSERT INTO `recorded` VALUES (1002,'2015-12-19 22:19:00','2015-12-19 23:09:10','QI XL','Merriment','Stephen Fry enjoys some merriment with Jenny Eclair, Johnny Vegas and Bill Bailey. Contains some strong language. Also in HD.',13,8,'Entertainment','defiant',0,0,0,0,0,'Default',2641,'fp.bbc.co.uk/nb9n2b','fp.bbc.co.uk/1rkhsh','ttvdb.py_72716','2015-12-19 23:09:10',1521299948,0,0,NULL,0,0,0,27,1,0,'1002_20151219221900.mpg','2015-12-19 22:20:00','2015-12-19 23:05:00','Default','Default',1,0,0,'Default','2015-12-19 23:05:00'); +INSERT INTO `recorded` VALUES (1303,'2015-12-02 20:59:00','2015-12-02 23:14:10','Insidious','Chapter 2','Supernatural horror sequel with Patrick Wilson, Rose Byrne and Lin Shaye. Josh is back and Renai remains desperate to prevent the malevolent spirits from haunting her family again.',0,0,'Film','defiant',0,0,0,1,0,'Default',3244,'','www.channel4.com/59556/001','tmdb3.py_49018','2015-12-02 23:14:10',1778673264,0,0,'2013-01-01',0,719528,0,27,1,0,'1303_20151202205900.mpg','2015-12-02 21:00:00','2015-12-02 23:10:00','Default','Default',1,0,0,'Default','2015-12-02 23:10:00'); +INSERT INTO `recorded` VALUES (1004,'2015-12-21 17:59:00','2015-12-21 18:34:10','The Simpsons','The Spy Who "Learned" Me','While he is at home on sick leave, Homer learns how to become a better husband with the help of dashing spy movie crime fighter Stradivarius Cain. (S23 Ep20/22)',0,0,'Entertainment','defiant',0,0,0,1,0,'Default',10,'www.channel4.com/c4ei0041105162151952','www.channel4.com/61647/020','','2015-12-21 18:34:10',613944080,0,0,NULL,0,0,0,27,1,0,'1004_20151221175900.mpg','2015-12-21 18:00:00','2015-12-21 18:30:00','Default','Default',1,0,0,'Default','2015-12-21 18:30:00'); /*!40000 ALTER TABLE `recorded` ENABLE KEYS */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/mythfs/unittests/fixtures/schema-min.sql b/mythfs/unittests/fixtures/schema-min.sql index ebf90d9..cec7041 100644 --- a/mythfs/unittests/fixtures/schema-min.sql +++ b/mythfs/unittests/fixtures/schema-min.sql @@ -23,8 +23,8 @@ /*!40101 SET character_set_client = utf8 */; CREATE TABLE `recorded` ( `chanid` int(10) unsigned NOT NULL DEFAULT '0', - `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `starttime` datetime NOT NULL, + `endtime` datetime NOT NULL, `title` varchar(128) NOT NULL DEFAULT '', `subtitle` varchar(128) NOT NULL DEFAULT '', `description` varchar(16000) NOT NULL DEFAULT '', @@ -54,15 +54,15 @@ CREATE TABLE `recorded` ( `timestretch` float NOT NULL DEFAULT '1', `recpriority` int(11) NOT NULL DEFAULT '0', `basename` varchar(255) NOT NULL, - `progstart` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `progend` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `progstart` datetime NOT NULL, + `progend` datetime NOT NULL, `playgroup` varchar(32) NOT NULL DEFAULT 'Default', `profile` varchar(32) NOT NULL DEFAULT '', `duplicate` tinyint(1) NOT NULL DEFAULT '0', `transcoded` tinyint(1) NOT NULL DEFAULT '0', `watched` tinyint(4) NOT NULL DEFAULT '0', `storagegroup` varchar(32) NOT NULL DEFAULT 'Default', - `bookmarkupdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `bookmarkupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`chanid`,`starttime`), UNIQUE KEY `uni_recorded_basename` (`basename`), KEY `endtime` (`endtime`), diff --git a/mythfs/unittests/fixtures/schema.sql b/mythfs/unittests/fixtures/schema.sql index 6034ecc..358f121 100644 --- a/mythfs/unittests/fixtures/schema.sql +++ b/mythfs/unittests/fixtures/schema.sql @@ -1477,8 +1477,8 @@ CREATE TABLE `record_tmp` ( /*!40101 SET character_set_client = utf8 */; CREATE TABLE `recorded` ( `chanid` int(10) unsigned NOT NULL DEFAULT '0', - `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `starttime` datetime NOT NULL, + `endtime` datetime NOT NULL, `title` varchar(128) NOT NULL DEFAULT '', `subtitle` varchar(128) NOT NULL DEFAULT '', `description` varchar(16000) NOT NULL DEFAULT '', @@ -1508,15 +1508,15 @@ CREATE TABLE `recorded` ( `timestretch` float NOT NULL DEFAULT '1', `recpriority` int(11) NOT NULL DEFAULT '0', `basename` varchar(255) NOT NULL, - `progstart` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `progend` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `progstart` datetime NOT NULL, + `progend` datetime NOT NULL, `playgroup` varchar(32) NOT NULL DEFAULT 'Default', `profile` varchar(32) NOT NULL DEFAULT '', `duplicate` tinyint(1) NOT NULL DEFAULT '0', `transcoded` tinyint(1) NOT NULL DEFAULT '0', `watched` tinyint(4) NOT NULL DEFAULT '0', `storagegroup` varchar(32) NOT NULL DEFAULT 'Default', - `bookmarkupdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `bookmarkupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`chanid`,`starttime`), UNIQUE KEY `uni_recorded_basename` (`basename`), KEY `endtime` (`endtime`), diff --git a/mythfs/unittests/mockDefs.cpp b/mythfs/unittests/mockDefs.cpp index 42ef4e8..2b13484 100644 --- a/mythfs/unittests/mockDefs.cpp +++ b/mythfs/unittests/mockDefs.cpp @@ -7,7 +7,7 @@ Service::Service() : DB::PluginMock<MySQL::Mock>("MythFS", { rootDir / "fixtures" / "schema-min.sql", rootDir / "fixtures" / "data.sql" - }, "options=p2testmysql") + }, "options=libdbpp") { } |