You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.5 KiB

  1. -
  2. I record a process log
  3. -
  4. !python {model: server.monitor.database}: |
  5. id = self.log_measure(cr, uid, context=context)
  6. -
  7. there should be some server.monitor.model.row.count in database
  8. -
  9. !python {model: server.monitor.model.row.count}: |
  10. ids = self.search(cr, uid, [], context=context)
  11. assert ids, 'No server.monitor.model.row.count instance count recorded'
  12. -
  13. there should be some server.monitor.model.table.size in database
  14. -
  15. !python {model: server.monitor.model.table.size}: |
  16. ids = self.search(cr, uid, [], context=context)
  17. assert ids, 'No server.monitor.model.table.size recorded'
  18. -
  19. there should be some server.monitor.model.table.activity.read in database
  20. -
  21. !python {model: server.monitor.model.table.activity.read}: |
  22. ids = self.search(cr, uid, [], context=context)
  23. assert ids, 'No server.monitor.model.table.activity.read recorded'
  24. -
  25. there should be some server.monitor.model.table.activity.update in database
  26. -
  27. !python {model: server.monitor.model.table.activity.update}: |
  28. ids = self.search(cr, uid, [], context=context)
  29. assert ids, 'No server.monitor.model.table.activity.update recorded'
  30. -
  31. I cleanup the database logs
  32. -
  33. !python {model: server.monitor.database}: |
  34. id = self.cleanup(cr, uid, -1, context=context)
  35. -
  36. there should be no server.monitor.model.row.count in database
  37. -
  38. !python {model: server.monitor.model.row.count}: |
  39. ids = self.search(cr, uid, [], context=context)
  40. assert not ids, 'server.monitor.model.row.count still present'
  41. -
  42. there should be no server.monitor.model.table.size in database
  43. -
  44. !python {model: server.monitor.model.table.size}: |
  45. ids = self.search(cr, uid, [], context=context)
  46. assert not ids, 'server.monitor.model.table.size still present'
  47. -
  48. there should be no server.monitor.model.table.activity.read in database
  49. -
  50. !python {model: server.monitor.model.table.activity.read}: |
  51. ids = self.search(cr, uid, [], context=context)
  52. assert not ids, 'server.monitor.model.table.activity.read still present'
  53. -
  54. there should be no server.monitor.model.table.activity.update in database
  55. -
  56. !python {model: server.monitor.model.table.activity.update}: |
  57. ids = self.search(cr, uid, [], context=context)
  58. assert not ids, 'server.monitor.model.table.activity.update still present'
  59. -
  60. there should be no server.monitor.database in database
  61. -
  62. !python {model: server.monitor.database}: |
  63. ids = self.search(cr, uid, [], context=context)
  64. assert not ids, 'server.monitor.database still present'