definitions

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

package definitions expose interfaces feature through predefined steps

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallAPI

func InstallAPI(s *godog.ScenarioContext, client *api.Client)

func InstallDebug

func InstallDebug(s *godog.ScenarioContext)

InstallDebug adds debug base definitions to known steps for provided godog ScenarioContext. It allows to activate or disable debug logs on specific features offered by kactus.

Provided steps:

  • (?:I )?want to debug types converters => activate debug logs for internal type conversion instance I want to debug types converters
  • (?:I )?want to stop debugging types converters => disable debug logs for internal type conversion instance I want to debug types converters
  • (?:I )?want to debug matchers => activate debug logs for internal matchers operation instance I want to debug matchers
  • (?:I )?want to stop debugging matchers$ => disable debug logs for internal matchers operation instance I want to debug matchers

func InstallFixtures

func InstallFixtures(s *godog.ScenarioContext, fix *fixtures.Fixtures)

InstallFixtures initialize fixtures.Fixtures features steps. It initialize the auto loading process for manifest from @manifest tags (@manifest:path/to/manifest.yml).

Provided steps: - (?:I )?load(?:ing)? fixture ([a-zA-Z0-9_./-]+)(?: into )?(.+) => execute fixture file in provided instance. Fixture kind will be determined from instance

I load fixture fix/test.sql into pg.example
  • (?:I )?load(?:ing)? manifest ([a-zA-Z0-9_./-]+) => parse and load fixture manifest. I load manifest fix/example_manifest.yml

func InstallGooglePubsub

func InstallGooglePubsub(s *godog.ScenarioContext, ps *pubsub.Google)

InstallGooglePubsub adds google pubsub steps to expose basic google pubsub features to known steps.

Provided steps:

  • (?:I )?expect(?:ing)? message to be received by (gcp\.[^:]+) within ([0-9]+) seconds:: => check if a message matching provided data was received within X seconds I expect message to be received by gcp.main within 1 seconds: | field | matcher | value | | user | contains | legit | | reader | = | me |
  • (?:I )?expect(?:ing)? message to be received by (gcp.[^:]+) within ([0-9]+) seconds having metadata: => check if a message matching provided metadata was received I expect message to be received by gcp.main within 1000 seconds: | field | matcher | value | | user | contains | legit | | reader | = | me |
  • (?:I )?send(?:ing)? message to (gcp\.[^:]+) in (topic\..+): => send a given message to gcp instance topic. Message has to contain a data key witch is a free json representing main message and a metadata key witch is a string: string object representing metadata I expect message to be sent by gcp.main in topic.testTopic: """ { "data": { "foo": "bar", "my_value": 1234 }, "metadata":{ "foo": "bar" } } """

func InstallPicker

func InstallPicker(s *godog.ScenarioContext, pickerInstance *picker.Picker)

InstallPicker adds picker base definitions to known steps for provided godog ScenarioContext. It returns the picker instance if you need to customize it or enrich known steps. You can safely ignore return value.

Provided steps:

  • (?:I )?want(?:ing)? to generate uuids (.*) => generate a new uuid for each provided key I want to generate uuids bookID, userID, mouseID
  • (?:I )?set(?:ting)? variable ([a-zA-Z0-9]*) to (.*) => store provided value under variable name I set variable X to 123i
  • (?:I )?want to assert picked variables matches: => ensures provided key value matches condition

(cf: picker.VerifiesPickedValues)

I want to assert picked variables matches:
| key | matcher | value         |
| X   | =       | 123i((reel))  |

func InstallPostgres

func InstallPostgres(s *godog.ScenarioContext, db *database.Postgres)

InstallPostgres adds postgres steps to expose basic pg features to known steps.

Provided steps:

  • (?:I )?expect(?:ing)? data to be in (pg.[^:]+): => check data exists in database I expect data to be in pg.example: | table | id | email | name | | users | 0 | test@gmail.com | something | | users | 1 | lol@gmail.com | lilacou |

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL