Skip to content

fix: exo CLI Bug exo config add panics when new first config without it being the default one#798

Merged
natalie-o-perret merged 7 commits intomasterfrom
natalieperret/sc-167366/exo-cli-bug-exo-config-add-panics-when
Feb 20, 2026
Merged

fix: exo CLI Bug exo config add panics when new first config without it being the default one#798
natalie-o-perret merged 7 commits intomasterfrom
natalieperret/sc-167366/exo-cli-bug-exo-config-add-panics-when

Conversation

@natalie-o-perret
Copy link
Contributor

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

Description

This pull request refactors and expands the test coverage for configuration handling in the CLI, especially around edge cases such as missing or broken configuration files and the absence of a default account. It introduces new end-to-end and integration tests to document and reproduce a known panic, and it improves the test infrastructure for easier discovery and execution of test scenarios. Some package renaming and cleanup are also included.

Test coverage improvements for configuration edge cases:

  • Added new e2e test scripts (.txtar files) to document and reproduce bugs when the config file is missing, when an account exists without a default, and to verify correct output with a valid config file. These tests also demonstrate the workaround using the --use-account flag.
  • Added an integration test (config_panic_test.go) to simulate and verify the panic when adding an account without setting it as default, which cannot be covered by non-interactive e2e tests (prompt-ui-based zone selection).

Test infrastructure improvements:

  • Enhanced the local test runner to recursively discover all .txtar test scripts, allowing easier addition of new test cases without manual registration.
  • Removed the obsolete isolated config file test and the API-tagged testscript runner, streamlining the test suite and focusing on relevant scenarios.

Package and code organization:

  • Renamed integration test packages from integ_test to integ for consistency and to facilitate internal test suite usage.
  • Cleaned up test dependencies in go.mod, removing unused packages.

Checklist

(For exoscale contributors)

  • Changelog updated (under Unreleased block)
  • Testing

Testing

@natalie-o-perret natalie-o-perret marked this pull request as ready for review February 20, 2026 12:58
@natalie-o-perret natalie-o-perret requested a review from a team February 20, 2026 12:58
@natalie-o-perret natalie-o-perret changed the title feat: Exo CLI Bug exo config add panics when new first config without it being the default one fix: exo CLI Bug exo config add panics when new first config without it being the default one Feb 20, 2026
Co-authored-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
@natalie-o-perret natalie-o-perret merged commit 81f0e74 into master Feb 20, 2026
3 checks passed
@natalie-o-perret natalie-o-perret deleted the natalieperret/sc-167366/exo-cli-bug-exo-config-add-panics-when branch February 20, 2026 15:32
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

Comments