testhelpers

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertConfig

func AssertConfig(t *testing.T, configDir string, email string, name string, newsletter bool)

func ChangeAccessToken

func ChangeAccessToken(t require.TestingT, configDir string)

func ClearConfig

func ClearConfig(t require.TestingT, configDir string)

func ConfigAwareCmd

func ConfigAwareCmd(configDir string) *cmdx.CommandExecuter

func ConfigPasswordAwareCmd

func ConfigPasswordAwareCmd(configDir, password string) *cmdx.CommandExecuter

func CreateAndUseProject added in v0.2.2

func CreateAndUseProject(t require.TestingT, configDir string) string

func CreateClient added in v0.1.41

func CreateClient(t require.TestingT, cmd *cmdx.CommandExecuter, project string) gjson.Result

func CreateDefaultAssets

func CreateDefaultAssets() (defaultConfig, defaultEmail, defaultPassword, extraProject, defaultProject string, defaultCmd *cmdx.CommandExecuter)

func CreateProject

func CreateProject(t require.TestingT, configDir string) string

func FakeEmail

func FakeEmail() string

func FakeName

func FakeName() string

func FakePassword

func FakePassword() string

func GetDefaultProject added in v0.2.2

func GetDefaultProject(t require.TestingT, configDir string) string

func ImportIdentity

func ImportIdentity(t require.TestingT, cmd *cmdx.CommandExecuter, project string, stdin *bytes.Buffer) string

func MakeRandomClient added in v0.1.41

func MakeRandomClient(t require.TestingT, name string) string

func MakeRandomIdentity

func MakeRandomIdentity(t require.TestingT, email string) string

func NewConfigDir

func NewConfigDir(t require.TestingT) string

func ReadConfig

func ReadConfig(t require.TestingT, configDir string) *client.AuthContext

func RegisterAccount

func RegisterAccount(t require.TestingT, configDir string) (email, password string)

func RegistrationBuffer added in v0.3.0

func RegistrationBuffer(name string, email string, password string) bytes.Buffer

func RunAgainstStaging

func RunAgainstStaging(m *testing.M)

func SetDefaultProject added in v0.2.2

func SetDefaultProject(t require.TestingT, configDir string, projectId string)

func TestProjectName

func TestProjectName() string

func UseStaging

func UseStaging()

func WithReAuth

func WithReAuth(t require.TestingT, email, password string) (*cmdx.CommandExecuter, *bytes.Buffer)

Types

This section is empty.

Jump to

Keyboard shortcuts

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