How to use the dockest.defaultHealthchecks.postgres function in dockest

To help you get started, weโ€™ve selected a few dockest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github erikengervall / dockest / packages / examples / multiple-resources / dockest.ts View on Github external
dockest.run([
  {
    serviceName: 'multiple_resources_postgres1sequelize',
    commands: [
      'sequelize db:migrate:undo:all',
      'sequelize db:migrate',
      'sequelize db:seed:undo:all',
      'sequelize db:seed --seed 20190101001337-demo-user',
    ],
    healthchecks: [defaultHealthchecks.postgres],
  },
  {
    serviceName: 'multiple_resources_postgres2knex',
    commands: ['knex migrate:rollback', 'knex migrate:latest', 'knex seed:run'],
    healthchecks: [defaultHealthchecks.postgres],
  },
  {
    serviceName: 'multiple_resources_redis',
    healthchecks: [defaultHealthchecks.redis],
  },
  { serviceName: 'multiple_resources_zookeeper' },
  { serviceName: 'multiple_resources_kafka' },
])
github erikengervall / dockest / packages / examples / multiple-compose-files / dockest.ts View on Github external
composeFile: ['docker-compose-redis.yml', 'docker-compose-postgres.yml'],
  dumpErrors: true,
  logLevel: logLevel.DEBUG,
  runInBand: true,
})

dockest.run([
  {
    serviceName: 'multiple_compose_files_postgres',
    commands: [
      'sequelize db:migrate:undo:all',
      'sequelize db:migrate',
      'sequelize db:seed:undo:all',
      'sequelize db:seed --seed 20190101001337-demo-user',
    ],
    healthchecks: [defaultHealthchecks.postgres],
  },

  { serviceName: 'multiple_compose_files_redis' },
])

dockest

Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst running multi-container Docker applications.

MIT
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis