random

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(strlen int) string

String generates a random alphanumeric string of the length specified.

func Template

func Template(tpl, rand string) string

Template renders templates defined with {{.random}} placeholders. This is useful for acceptance tests. By introducing entropy to resources generated during the tests, we can run tests concurrently.

func TemplateMap added in v1.1.0

func TemplateMap(tpl string, values map[string]string) string

TemplateMap has the same behaviour as Template, but allows to pass a map of values instead of a single rand

func TestCheckResourceAttr

func TestCheckResourceAttr(name, key, value, rand string) resource.TestCheckFunc

TestCheckResourceAttr is a TestCheckFunc which validates the value in state for the given name/key combination after applying a template over the value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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