comtesting

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package comtesting implements utility methods useful for testing both client and server components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTempDir

func GetTempDir(testName string) (string, func())

GetTempDir creates and returns the name of a temporary directory. Multiple calls will return the same name. It uses the name of the test that is being run as part of the name of the directory.

The second returned value is a platform-specific cleanup function. This is particularly useful on Windows, where the current user's homedir can be returned as the temp dir, and gets cluttered quickly.

func ServerCert

func ServerCert() (cert []byte, key []byte, err error)

ServerCert returns a self signed, PEM encoded certificate and associated PEM encoded private key, appropriate for use when creating Fleetspeak test server in a unit test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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