-
Notifications
You must be signed in to change notification settings - Fork 22
feat(test): New UI implementation for ie test & refactor various parts of the engine
#198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ock state to be more generic.
…rs in preparation to unify all ui implementations.
…updates from ie test.
…ing commands after being initialized.
Member
|
Fixes #66 |
mbifeld
reviewed
Jun 12, 2024
… vmarcella/update-test-ui
…t in github actions, update logic for deleting resource groups after execution, and add more tests to test-mode.
…atch the resource group name, update ExecuteBashCommand to be a variable exported from shells/bash.go for easier mocking, and update model tests.
mbifeld
approved these changes
Jun 19, 2024
… the FailedCommandMessage to be part of the error output and update CompareCommandOutputs to return better error messages to describe what happened.
…nd finishes executing.
…n when not rendering in CI.
…e can't assume that all cis will not have ttys.
ie test UI implementation & refactor various parts of the engineie test & refactor various parts of the engine
mbifeld
approved these changes
Jun 28, 2024
Member
mbifeld
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm curious if you could share what the crash behavior is when ie test is ran in GitHub actions without the needed flag. How should the user know they are missing the flag?
vmarcella
added a commit
that referenced
this pull request
Jun 9, 2025
…rts of the engine (#198) This PR: * 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 actions/runner#241 for more information on GH actions not providing a TTY). *
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR:
ie testto use bubbletea for rendering it's output, similar toie interactiveand soonie execute.ie interactiveandie testimplementations to exist in their own folders inside ofengine(Which will be renamed toiein the future).internal/engine/common.Engineas a parameter in preparation for when it will be deprecated in the future.shells.ExecuteCodeBlockto be a variable alias ofshells.executeCodeBlockImpl. This allows for us to easily mock the theExecuteCodeBlockimplementation 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 testinside of github actions runners. If this flag is not supplied,ie testwill crash due to bubbletea attempting to open tty when there are no ttys available. (See Not a tty actions/runner#241 for more information on GH actions not providing a TTY).