Skip to content

Comments

feat: add PTY infrastructure for testscript and fix config bugs#800

Merged
natalie-o-perret merged 2 commits intomasterfrom
natalieperret/sc-167823/feature-request-pty-support-for-testscript
Feb 24, 2026
Merged

feat: add PTY infrastructure for testscript and fix config bugs#800
natalie-o-perret merged 2 commits intomasterfrom
natalieperret/sc-167823/feature-request-pty-support-for-testscript

Conversation

@natalie-o-perret
Copy link
Contributor

@natalie-o-perret natalie-o-perret commented Feb 23, 2026

PTY Infrastructure:

  • Add execpty testscript command for testing interactive prompts
  • Support 8 input tokens (@down, @up, @Enter, @ctrl+c, @ctrl+d, @escape)
  • ANSI escape code stripping for clean assertions
  • Enables testing of promptui-based interactive commands

Bug Fixes:

  • Fix config file creation on first account setup
  • Fix config set circular dependency (allow config commands without default)
  • Handle empty defaultAccount gracefully with GetString()

Test Coverage:

  • Basic interactive config add test
  • Config set without default account test
  • No config file handling test

This PR lays the foundation for comprehensive interactive testing in subsequent PRs (e.g., https://github.com/exoscale/cli/pull/801/changes)

Description

Checklist

(For exoscale contributors)

  • Changelog updated (under Unreleased block)
  • Testing

Testing

Testscript on exo config add / set

@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from ae806f9 to 96203b1 Compare February 23, 2026 08:45
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from 96203b1 to f362dd4 Compare February 23, 2026 08:49
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from f362dd4 to 011844e Compare February 23, 2026 08:52
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from 011844e to 11f03d7 Compare February 23, 2026 08:54
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from 11f03d7 to bee78ba Compare February 23, 2026 08:57
natalie-o-perret added a commit that referenced this pull request Feb 23, 2026
- Add PTY infrastructure for testing interactive commands using testscript
- Add execpty command with support for 8 input tokens
- Add automated tests for interactive flows
- Fix config file creation when adding first account
- Fix circular dependency in config set command
- Fix panic when used without default account set #798
- Update CI workflow to use build action and add test job dependencies
- Remove redundant testscript.yml workflow
- Make integration tests resilient when no test files exist

#800
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from bee78ba to 8de18e6 Compare February 23, 2026 09:02
natalie-o-perret added a commit that referenced this pull request Feb 23, 2026
- Add PTY infrastructure for testing interactive commands using testscript
- Add execpty command with support for 8 input tokens
- Add automated tests for interactive flows
- Fix config file creation when adding first account
- Fix circular dependency in config set command
- Fix panic when used without default account set #798
- Update CI workflow to use build action and add test job dependencies
- Remove redundant testscript.yml workflow
- Make integration tests resilient when no test files exist

#800
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from 8de18e6 to e4efc6a Compare February 23, 2026 09:15
natalie-o-perret added a commit that referenced this pull request Feb 23, 2026
- Add PTY infrastructure for testing interactive commands using testscript
- Add execpty command with support for 8 input tokens
- Add automated tests for interactive flows
- Fix config file creation when adding first account
- Fix circular dependency in config set command
- Fix panic when used without default account set #798
- Update CI workflow to use build action and add test job dependencies
- Remove redundant testscript.yml workflow
- Make integration tests resilient when no test files exist

#800
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch 2 times, most recently from d2889b5 to 272091e Compare February 23, 2026 10:01
natalie-o-perret added a commit that referenced this pull request Feb 23, 2026
- Add PTY infrastructure for testing interactive commands using testscript
- Add execpty command with support for 8 input tokens
- Add automated tests for interactive flows
- Fix config file creation when adding first account
- Fix circular dependency in config set command
- Fix panic when used without default account set #798
- Update CI workflow to use build action and add test job dependencies
- Remove redundant testscript.yml workflow
- Make integration tests resilient when no test files exist

#800
natalie-o-perret added a commit that referenced this pull request Feb 23, 2026
- Add PTY infrastructure for testing interactive commands using testscript
- Add execpty command with support for 8 input tokens
- Add automated tests for interactive flows
- Fix config file creation when adding first account
- Fix circular dependency in config set command
- Fix panic when used without default account set #798
- Update CI workflow to use build action and add test job dependencies
- Remove redundant testscript.yml workflow
- Make integration tests resilient when no test files exist

#800
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from 272091e to affd23a Compare February 23, 2026 10:04
- Add PTY infrastructure for testing interactive commands using testscript
- Add execpty command with support for 8 input tokens
- Add automated tests for interactive flows
- Fix config file creation when adding first account
- Fix circular dependency in config set command
- Fix panic when used without default account set #798
- Update CI workflow to use build action and add test job dependencies
- Remove redundant testscript.yml workflow
- Make integration tests resilient when no test files exist

#800
@natalie-o-perret natalie-o-perret force-pushed the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch from affd23a to 177a7df Compare February 23, 2026 10:17
@natalie-o-perret natalie-o-perret marked this pull request as ready for review February 23, 2026 10:21
@natalie-o-perret natalie-o-perret requested a review from a team February 23, 2026 10:21
@natalie-o-perret natalie-o-perret merged commit d448ed5 into master Feb 24, 2026
4 checks passed
@natalie-o-perret natalie-o-perret deleted the natalieperret/sc-167823/feature-request-pty-support-for-testscript branch February 24, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants