Azure / Azure/azure-cli-extensions

Testing az cli extension

Open
#5,967 4 comments 0 reactions 1 assignee Claimed by @jsntcy View on GitHub
Azure CLI Team Documentation feature-request
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

The steps for how to test an az cli extension are split over multiple repos:
- https://github.com/Azure/azure-cli/blob/dev/doc/extensions/authoring.md
- https://github.com/Azure/azure-cli-dev-tools/blob/dev/README.md
- https://github.com/Azure/azure-cli-extensions/blob/main/README.md

This makes it really difficult for a new developer to onboard quickly.

I wanted to open this issue to discuss the possibility of adding some scripts that developers can run in a single command to get bootstrapped, to create a new extension, and to run tests. Samples taken from #5944

```
# bootstrap
git clone https://www.github.com/azure/azure-cli
git clone https://www.github.com/azure/azure-cli-extensions
python3 -m venv azcli-extension-env
source azcli-extension-env/bin/activate
pip install azdev
azdev setup --cli ./azure-cli --repo ./azure-cli-extensions
```

```
# test
cd azure-cli-extensions
azdev setup -r . -e
azdev test
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.