venom: Index | Files

package rabbitmq

import ""


Package Files



const Name = "rabbitmq"

Name of executor

func New Uses

func New() venom.Executor

New returns a new Executor

type Executor Uses

type Executor struct {
    Addrs string `json:"addrs" yaml:"addrs"`
    // WithTLS  bool     `json:"with_tls" yaml:"withTLS"`
    User     string `json:"user" yaml:"user"`
    Password string `json:"password" yaml:"password"`

    //ClientType must be "consumer" or "producer"
    ClientType string `json:"client_type" yaml:"clientType"`

    // QName represents the RabbitMQ queue name
    QName string `json:"q_name" yaml:"qName"`
    // Durable represents the RabbitMQ durable parameter
    Durable bool `json:"durable" yaml:"durable"`

    // Exchange represents the RabbitMQ exchange
    Exchange string `json:"exchange" yaml:"exchange"`
    // RoutingKey represents the RabbitMQ routing key
    ExchangeType string `json:"exchange_type" yaml:"exchangeType"`
    // ExchangeType respresents the type of exchange (fanout, etc..)
    RoutingKey string `json:"routing_key" yaml:"routingKey"`

    //Represents the limit of message will be read. After limit, consumer stop read message
    MessageLimit int `json:"message_limit" yaml:"messageLimit"`

    //Used when ClientType is producer
    //Messages represents the message sended by producer
    Messages []Message `json:"messages" yaml:"messages"`

Executor represents a Test Exec

func (Executor) GetDefaultAssertions Uses

func (Executor) GetDefaultAssertions() *venom.StepAssertions

GetDefaultAssertions return default assertions for type exec

func (Executor) Run Uses

func (Executor) Run(testCaseContext venom.TestCaseContext, l venom.Logger, step venom.TestStep, workdir string) (venom.ExecutorResult, error)

Run execute TestStep of type exec

func (Executor) ZeroValueResult Uses

func (Executor) ZeroValueResult() venom.ExecutorResult

ZeroValueResult return an empty implemtation of this executor result

type Message Uses

type Message struct {
    Value           string     `json:"value" yaml:"value"`
    Headers         amqp.Table `json:"headers" yaml:"headers"`
    Persistent      bool       `json:"persistent" yaml:"persistent"`
    ContentType     string     `json:"content_type" yaml:"contentType"`
    ContentEncoding string     `json:"content_encoding" yaml:"contentEncoding"`

Message represents the object sended or received from rabbitmq

type Result Uses

type Result struct {
    Executor    Executor      `json:"executor" yaml:"executor"`
    TimeSeconds float64       `json:"timeSeconds" yaml:"timeSeconds"`
    TimeHuman   string        `json:"timeHuman" yaml:"timeHuman"`
    Body        []string      `json:"body" yaml:"body"`
    Messages    []interface{} `json:"messages" yaml:"messages"`
    BodyJSON    []interface{} `json:"bodyJSON" yaml:"bodyJSON"`
    Headers     []amqp.Table  `json:"headers" yaml:"headers"`
    Err         string        `json:"error" yaml:"error"`

Result represents a step result.

Package rabbitmq imports 7 packages (graph) and is imported by 2 packages. Updated 2020-10-12. Refresh now. Tools for package owners.