mcabber

package
v0.21.4 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package mcabber facilitates integration testing against Mcabber.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFile

func ConfigFile(cfg Config) integration.Option

ConfigFile is an option that can be used to write a temporary config file. This will overwrite the existing config file and make most of the other options in this package noops. This option only exists for the rare occasion that you need complete control over the config file.

func Ping

func Ping(cmd *integration.Cmd, to jid.JID) error

Ping sends an XMPP ping through Mcabber.

func Send

func Send(cmd *integration.Cmd, s string) error

Send transmits the given command over the control pipe.

func Test

Test starts a Mcabber instance and returns a function that runs subtests using t.Run. Multiple calls to the returned function will result in uniquely named subtests. When all subtests have completed, the daemon is stopped.

Types

type Config

type Config struct {
	JID      jid.JID
	Password string
	FIFO     *os.File
	Port     string
}

Config contains options that can be written to the config file.

Jump to

Keyboard shortcuts

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