Documentation ¶
Index ¶
Constants ¶
const (
HeartbeatInterval = 10 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func GetOutputFlagValue ¶
GetOutputFlagValue returns the value specified by --output. If --output is not specified, it returns an empty string
func GetSourcePath ¶
func GetSourcePath() string
Types ¶
type CLI ¶
type CLI struct { T *testing.T WorkingDirectory string Env []string // Path to the azd binary AzdPath string }
The azd CLI.
Consumers should use the NewCLI constructor to initialize this struct.
func NewCLI ¶
Constructs the CLI. On a local developer machine, this also ensures that the azd binary is up-to-date before running.
By default, the path to the default source location is used, see GetSourcePath. Environment variable CLI_TEST_AZD_PATH can be used to set the path to the azd binary. This can be done in CI to run the tests against a specific azd binary.
When CI is detected, no automatic build is performed. To disable automatic build behavior, CLI_TEST_SKIP_BUILD can be set to a truthy value.
func (*CLI) RunCommand ¶
type Options ¶
type Options interface {
Apply(o *option)
}
func WithSession ¶
WithSession sets a recording session to use for the test.
type TestCredential ¶
type TestCredential struct {
// contains filtered or unexported fields
}
TestCredential Used to used the auth strategy already used to create the Cli instance
func NewTestCredential ¶
func NewTestCredential(azCli *CLI) *TestCredential
NewTestCredential Creates a new TestCredential
func (*TestCredential) GetToken ¶
func (cred *TestCredential) GetToken(ctx context.Context, options policy.TokenRequestOptions) (azcore.AccessToken, error)
GetToken Gets the token from the CLI instance