-
Notifications
You must be signed in to change notification settings - Fork 261
Extensions integration for figspec and usage snapshot tests #6286
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
base: main
Are you sure you want to change the base?
Conversation
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
| ], | ||
| }, | ||
| { | ||
| name: ['demo'], |
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.
Do we want to include the demo extension for all azd users?
| description: 'Print the version number of Azure Developer CLI.', | ||
| }, | ||
| { | ||
| name: ['x'], |
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.
Do we want to include the x extension for all azd users?
Resolves #6121
This PR updates the TestFigSpec (
figspec_test.go) and TestUsage (usage_test.go) snapshot tests to always include extension commands in the generated snapshots. This is achieved through configuring an isolatedAZD_CONFIG_DIRand auto-installing all extensions inregistry.jsonas part of the tests.Previously, these snapshot tests used the default local azd config, which had the unintended side effect of test pipelines potentially failing if
TestUsage-azd.snapcontained extension commands. These changes ensure the snapshot tests behave the same when run locally or in a pipeline environment.This PR also introduces a new lightweight GitHub Actions workflow (
.github/workflows/ext-registry-ci.yml) that runs both snapshot tests wheneverregistry.jsonis updated so they don't fall out of sync.Other changes
FigSpec snapshot (

TestFigSpec.ts): Now includesai,coding-agent,demo, andxextension subcommands for improved VS Code IntelliSense coverage. This complements the autoinstall feature.Usage snapshots: Updated snapshots for root
azd helpand extension subcommands.Figspec generator for
azd extension show: Dynamically suggest extension IDs forazd extension showUpdated
extension-framework.mdandfig-spec.mdwith information about snapshot testing for extensionsTesting
ext-registry-ci- out-of-date snapshotext-registry-ci- successful runazp - out-of-date snapshot