Updates ie test to use bubbletea for rendering it's output, similar to ie interactive and soon ie execute.
Refactors ie interactive and ie test implementations to exist in their own folders inside of engine (Which will be renamed to ie in the future).
Refactors code commonly used across execute, interactive, and test modes into a new package found in internal/engine/common.
Decoupled models from requiring a pointer to Engine as a parameter in preparation for when it will be deprecated in the future.
Reimplements shells.ExecuteCodeBlock to be a variable alias of shells.executeCodeBlockImpl. This allows for us to easily mock the the ExecuteCodeBlock implementation easily in tests. This allows us to do things like track calls to commands, record what commands were failed, mimic failures from executing commands, etc without having to actually execute commands. This is particularly useful in cases where we want to test the behavior of executing an Azure CLI command without actually executing the command itself.
Fixed an issue with the regex used to locate resource groups inside of command outputs and added tests to ensure that it works.
Adds a new environment github-action, specifically for running ie test inside of github actions runners. If this flag is not supplied, ie test will crash due to bubbletea attempting to open tty when there are no ttys available. (See https://github.com/actions/runner/issues/241 for more information on GH actions not providing a TTY).
This PR:
ie test
to use bubbletea for rendering it's output, similar toie interactive
and soonie execute
.ie interactive
andie test
implementations to exist in their own folders inside ofengine
(Which will be renamed toie
in the future).internal/engine/common
.Engine
as a parameter in preparation for when it will be deprecated in the future.shells.ExecuteCodeBlock
to be a variable alias ofshells.executeCodeBlockImpl
. This allows for us to easily mock the theExecuteCodeBlock
implementation easily in tests. This allows us to do things like track calls to commands, record what commands were failed, mimic failures from executing commands, etc without having to actually execute commands. This is particularly useful in cases where we want to test the behavior of executing an Azure CLI command without actually executing the command itself.github-action
, specifically for runningie test
inside of github actions runners. If this flag is not supplied,ie test
will crash due to bubbletea attempting to open tty when there are no ttys available. (See https://github.com/actions/runner/issues/241 for more information on GH actions not providing a TTY).