Skip to content
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

Pk5/add integration tests #6563

Closed

Conversation

patrykkulik-microsoft
Copy link
Contributor

This adds integration tests which test the publish and delete commands for the nfds and nsds in our CLI. These use the Azure Cli testing framework. Interestingly, they make use of something called a VCR module which records the communication between Azure and the CLI and saves that into a yaml file. This means that all tests which run after the initial recording are no longer live and make use of the recording file. This makes them run far faster and makes them repeatable.

The CNF tests which I added have been commented out because I cannot make them work without the CLI bug being fixed.


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Cyclam and others added 21 commits July 4, 2023 16:45
# Main changes

## Make methods relying on self._tmp_dir private
- `self._tmp_dir` is only available in the context of calling `generate_nfd()`, so methods relying on `self._tmp_dir` should be private

## Use pathlib.Path rather than os file operations
- Provides clearer and stronger typing than passing `str`s around
- Adds some handy utility functions

## Variable renaming for clarity
- E.g. consistently use 'directory' / 'dir' (rather than mix with 'folder')
- Obvs somewhat subjective, but as someone new to most of this code, the changes made sense to me

## Add nfd_bicep_path as abstract property on NFDGenerator
- We rely on it when calling the concrete implementations
- Also use ABC rather than raise NotImplementedError

## Miscellaneous style updates to keep `azdev style aosm` happy
- isort
- black
Add unit tests for build and generate config.
* Fix Artifact upload on Windows

* mypy fixups

* mypy fixes

* linting

* mypy

* mypy for _configuration.py

* mypy for vnf_nfd_generator.py

* mypy appeasement

* python-static-checks fmt

* az style happy

* lint

* mypy cnf_nfd_generator

* copyright

* more lint

* Remove windows oras workaround now 0.0.18 oras out

* history

---------

Co-authored-by: Jamie Parsons <[email protected]>
* Update README with logging info

* Update docs
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link

Hi @patrykkulik-microsoft,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link

Hi @patrykkulik-microsoft,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 26, 2023

Thank you for your contribution! We will review the pull request and get back to you soon.

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.

None yet

10 participants