Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.37 KB | None | 0 0
  1. DEBUG [2017-06-23T08:39:07.039Z] (Kok/3660 on maxgolon): Executing (default): CREATE TABLE IF NOT EXISTS `clients` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `login` VARCHAR(20) NOT NULL UNIQUE, `password` VARCHAR(20) NOT NULL, `name` TEXT NOT NULL, `address` TEXT NOT NULL, `email` TEXT NOT NULL, `materials_version` INTEGER, `prices_version` INTEGER, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, UNIQUE (`login`));
  2. DEBUG [2017-06-23T08:39:07.100Z] (Kok/3660 on maxgolon): <--- GET /api/1/clients
  3. host: "127.0.0.1:50546"
  4. accept-encoding: "gzip, deflate"
  5. user-agent: "node-superagent/3.5.2"
  6. connection: "close"
  7. DEBUG [2017-06-23T08:39:07.115Z] (Kok/3660 on maxgolon): Executing (default): SELECT `id`, `login`, `password`, `name`, `address`, `email`, `materials_version`, `prices_version` FROM `clients` AS `clients`;
  8. DEBUG [2017-06-23T08:39:07.123Z] (Kok/3660 on maxgolon): Executing (default): PRAGMA INDEX_LIST(`clients`)
  9. DEBUG [2017-06-23T08:39:07.128Z] (Kok/3660 on maxgolon): Executing (default): PRAGMA INDEX_INFO(`sqlite_autoindex_clients_1`)
  10. DEBUG [2017-06-23T08:39:07.132Z] (Kok/3660 on maxgolon): ---> 200 OK
  11. x-dns-prefetch-control: "off"
  12. x-frame-options: "SAMEORIGIN"
  13. x-download-options: "noopen"
  14. x-content-type-options: "nosniff"
  15. x-xss-protection: "1; mode=block"
  16. content-type: "application/json; charset=utf-8"
  17. DEBUG [2017-06-23T08:39:07.163Z] (Kok/3660 on maxgolon): Executing (default): CREATE TABLE IF NOT EXISTS `materials` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `code` TEXT, `name` TEXT, `name_eng` TEXT, `version`
  18. INTEGER, `unit` VARCHAR(2), `type` VARCHAR(1), `price_group` VARCHAR(10), `quantity_type` VARCHAR(1), `launch_code` INTEGER, `cost_code` INTEGER, `realization_income` INTEGER, `realization_cost` INTEGER, `is_archived` TINYINT(1), `net_weight` INTEGER, `country` TEXT, `description` TEXT, `company` TEXT, `cn` INTEGER, `variety` TEXT, `surface` TEXT, `tyyp` TEXT, `length` INTEGER, `width` INTEGER, `thickness` INTEGER, `kile` TEXT, `m2` INTEGER, `package` TEXT, `serv1` VARCHAR(1), `serv2` VARCHAR(1), `serv3` VARCHAR(1), `serv4` VARCHAR(1), `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL);
  19. DEBUG [2017-06-23T08:39:07.170Z] (Kok/3660 on maxgolon): <--- POST /api/1/clients
  20. host: "127.0.0.1:50548"
  21. accept-encoding: "gzip, deflate"
  22. user-agent: "node-superagent/3.5.2"
  23. content-type: "application/json"
  24. content-length: "161"
  25. connection: "close"
  26. DEBUG [2017-06-23T08:39:07.228Z] (Kok/3660 on maxgolon): Executing (default): INSERT INTO `clients` (`id`,`login`,`password`,`name`,`address`,`email`,`materials_version`,`prices_version`,`createdAt`,`updatedAt`) VALUES (NULL,'Client1','Password1','Client''s name','Client''s address','client@mail.com',1,2,'2017-06-23 08:39:07.193 +00:00','2017-06-23 08:39:07.193 +00:00');
  27. DEBUG [2017-06-23T08:39:07.236Z] (Kok/3660 on maxgolon): Executing (default): PRAGMA INDEX_LIST(`materials`)
  28. DEBUG [2017-06-23T08:39:07.242Z] (Kok/3660 on maxgolon): ---> 200 OK
  29. x-dns-prefetch-control: "off"
  30. x-frame-options: "SAMEORIGIN"
  31. x-download-options: "noopen"
  32. x-content-type-options: "nosniff"
  33. x-xss-protection: "1; mode=block"
  34. DEBUG [2017-06-23T08:39:07.251Z] (Kok/3660 on maxgolon): Executing (default): CREATE TABLE IF NOT EXISTS `orders` (`number` INTEGER PRIMARY KEY AUTOINCREMENT, `date` DATE, `need_date` DATE, `comments` TEXT, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL);
  35. DEBUG [2017-06-23T08:39:07.253Z] (Kok/3660 on maxgolon): <--- GET /api/1/clients/Client1
  36. host: "127.0.0.1:50550"
  37. accept-encoding: "gzip, deflate"
  38. user-agent: "node-superagent/3.5.2"
  39. connection: "close"
  40. DEBUG [2017-06-23T08:39:07.261Z] (Kok/3660 on maxgolon): Executing (default): SELECT `id`, `login`, `password`, `name`, `address`, `email`, `materials_version`, `prices_version` FROM `clients` AS `clients` WHERE `clients`.`login` = 'Client1' LIMIT 1;
  41. DEBUG [2017-06-23T08:39:07.266Z] (Kok/3660 on maxgolon): Executing (default): PRAGMA INDEX_LIST(`orders`)
  42. DEBUG [2017-06-23T08:39:07.278Z] (Kok/3660 on maxgolon): ---> 200 OK
  43. x-dns-prefetch-control: "off"
  44. x-frame-options: "SAMEORIGIN"
  45. x-download-options: "noopen"
  46. x-content-type-options: "nosniff"
  47. x-xss-protection: "1; mode=block"
  48. content-type: "application/json; charset=utf-8"
  49. DEBUG [2017-06-23T08:39:07.288Z] (Kok/3660 on maxgolon): Executing (default): CREATE TABLE IF NOT EXISTS `OrdersMaterials` (`createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, `materialId` INTEGER NOT
  50. NULL REFERENCES `materials` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, `orderNumber` INTEGER NOT NULL REFERENCES `orders` (`number`) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY (`materialId`, `orderNumber`));
  51. DEBUG [2017-06-23T08:39:07.293Z] (Kok/3660 on maxgolon): <--- POST /api/1/clients
  52. host: "127.0.0.1:50552"
  53. accept-encoding: "gzip, deflate"
  54. user-agent: "node-superagent/3.5.2"
  55. content-type: "application/json"
  56. content-length: "164"
  57. connection: "close"
  58. DEBUG [2017-06-23T08:39:07.295Z] (Kok/3660 on maxgolon): Executing (default): PRAGMA INDEX_LIST(`OrdersMaterials`)
  59. DEBUG [2017-06-23T08:39:07.304Z] (Kok/3660 on maxgolon): Executing (default): INSERT INTO `clients` (`id`,`login`,`password`,`name`,`address`,`email`,`materials_version`,`prices_version`,`createdAt`,`updatedAt`) VALUES (NULL,'Client2','Password2','Client''s name2','Client''s address2','client2@mail.com',3,4,'2017-06-23 08:39:07.299 +00:00','2017-06-23 08:39:07.299 +00:00');
  60. DEBUG [2017-06-23T08:39:07.308Z] (Kok/3660 on maxgolon): Executing (default): PRAGMA INDEX_INFO(`sqlite_autoindex_OrdersMaterials_1`)
  61. DEBUG [2017-06-23T08:39:07.309Z] (Kok/3660 on maxgolon): ---> 200 OK
  62. x-dns-prefetch-control: "off"
  63. x-frame-options: "SAMEORIGIN"
  64. x-download-options: "noopen"
  65. x-content-type-options: "nosniff"
  66. x-xss-protection: "1; mode=block"
  67. INFO [2017-06-23T08:39:07.314Z] (Kok/3660 on maxgolon): Synced tables
  68. DEBUG [2017-06-23T08:39:07.315Z] (Kok/3660 on maxgolon): <--- GET /api/1/clients/Client2
  69. host: "127.0.0.1:50554"
  70. accept-encoding: "gzip, deflate"
  71. user-agent: "node-superagent/3.5.2"
  72. connection: "close"
  73. DEBUG [2017-06-23T08:39:07.318Z] (Kok/3660 on maxgolon): Executing (default): SELECT `id`, `login`, `password`, `name`, `address`, `email`, `materials_version`, `prices_version` FROM `clients` AS `clients` WHERE `clients`.`login` = 'Client2' LIMIT 1;
  74. DEBUG [2017-06-23T08:39:07.328Z] (Kok/3660 on maxgolon): ---> 200 OK
  75. x-dns-prefetch-control: "off"
  76. x-frame-options: "SAMEORIGIN"
  77. x-download-options: "noopen"
  78. x-content-type-options: "nosniff"
  79. x-xss-protection: "1; mode=block"
  80. content-type: "application/json; charset=utf-8"
  81. DEBUG [2017-06-23T08:39:07.334Z] (Kok/3660 on maxgolon): <--- GET /api/1/clients
  82. host: "127.0.0.1:50556"
  83. accept-encoding: "gzip, deflate"
  84. user-agent: "node-superagent/3.5.2"
  85. connection: "close"
  86. DEBUG [2017-06-23T08:39:07.340Z] (Kok/3660 on maxgolon): Executing (default): SELECT `id`, `login`, `password`, `name`, `address`, `email`, `materials_version`, `prices_version` FROM `clients` AS `clients` WHERE `clients`.`login` = 'Client2';
  87. DEBUG [2017-06-23T08:39:07.344Z] (Kok/3660 on maxgolon): ---> 200 OK
  88. x-dns-prefetch-control: "off"
  89. x-frame-options: "SAMEORIGIN"
  90. x-download-options: "noopen"
  91. x-content-type-options: "nosniff"
  92. x-xss-protection: "1; mode=block"
  93. content-type: "application/json; charset=utf-8"
  94. DEBUG [2017-06-23T08:39:07.358Z] (Kok/3660 on maxgolon): <--- DELETE /api/1/clients/Client1
  95. host: "127.0.0.1:50558"
  96. accept-encoding: "gzip, deflate"
  97. user-agent: "node-superagent/3.5.2"
  98. connection: "close"
  99. DEBUG [2017-06-23T08:39:07.362Z] (Kok/3660 on maxgolon): Executing (default): SELECT `id`, `login`, `password`, `name`, `address`, `email`, `materials_version`, `prices_version`, `createdAt`, `updatedAt` FROM `clients` AS `clients` WHERE `clients`.`login` = 'Client1' LIMIT 1;
  100. DEBUG [2017-06-23T08:39:07.374Z] (Kok/3660 on maxgolon): Executing (default): DELETE FROM `clients` WHERE `id` = 1
  101. DEBUG [2017-06-23T08:39:07.379Z] (Kok/3660 on maxgolon): ---> 200 OK
  102. x-dns-prefetch-control: "off"
  103. x-frame-options: "SAMEORIGIN"
  104. x-download-options: "noopen"
  105. x-content-type-options: "nosniff"
  106. x-xss-protection: "1; mode=block"
  107. DEBUG [2017-06-23T08:39:07.384Z] (Kok/3660 on maxgolon): <--- DELETE /api/1/clients/Client2
  108. host: "127.0.0.1:50560"
  109. accept-encoding: "gzip, deflate"
  110. user-agent: "node-superagent/3.5.2"
  111. connection: "close"
  112. DEBUG [2017-06-23T08:39:07.392Z] (Kok/3660 on maxgolon): Executing (default): SELECT `id`, `login`, `password`, `name`, `address`, `email`, `materials_version`, `prices_version`, `createdAt`, `updatedAt` FROM `clients` AS `clients` WHERE `clients`.`login` = 'Client2' LIMIT 1;
  113. DEBUG [2017-06-23T08:39:07.400Z] (Kok/3660 on maxgolon): Executing (default): DELETE FROM `clients` WHERE `id` = 2
  114. DEBUG [2017-06-23T08:39:07.407Z] (Kok/3660 on maxgolon): ---> 200 OK
  115. x-dns-prefetch-control: "off"
  116. x-frame-options: "SAMEORIGIN"
  117. x-download-options: "noopen"
  118. x-content-type-options: "nosniff"
  119. x-xss-protection: "1; mode=block"
  120.  
  121. 1 failed
  122.  
  123. Create two different clients
  124. C:\repos\kok\test\api.js:58
  125.  
  126. 57: //TODO: find out why it returns 1 despite having two rows in table
  127. 58: t.is(result.body.length, 2)
  128. 59: t.deepEqual(result.body, [client_data, client_data2])
  129.  
  130. Actual:
  131.  
  132. 1
  133.  
  134. Must be strictly equal to:
  135.  
  136. 2
  137.  
  138. Test.<anonymous> (test/api.js:58:7)
  139. step (test/api.js:13:191)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement