Azure / Azure/iotedgedev

Fix flaky tests tests/test_iotedgedev_solution.py

Open
#564 0 comments 0 reactions 0 assignees View on GitHub
bug one week hack priority:low
Dominant language
Python
Stars
166
Forks
76
PR merge metrics
No merged PRs in 30d

Description

- iotedgedev Version: v3.3.4
- Python Version: 3.6
- Pip Version:
- Development machine OS Version: Ubuntu 20.04
- IoT Edge device OS Version: Ubuntu 20.04

The tests that call `create_solution()` in tests/test_iotedgedev_solution.py fail when the directory where the edge solution needs to be created is not empty. This happens when the files from a previous pipeline run are still there. The directory should be clean up on test setup and teardown.

```
Exception: ERROR: Directory is not empty. Run `iotedgedev iothub setup` to retrieve or create required Azure resources or clean the directory.
```
See [pipeline run](https://dev.azure.com/Azure-IoT-DDE-EdgeExperience/IoTEdgeDev/_build/results?buildId=3661&view=logs&j=7a9ce834-6c19-5d42-50a9-8919652b4fef&t=58f3d9b9-c9a0-5aed-3a48-2eea66cc08d9).
![image](https://user-images.githubusercontent.com/67916678/167656553-69b8d6da-6004-4883-9678-7a267503d6d7.png)

Steps to Reproduce:

1. Run the corresponding tests in tests/test_iotedgedev_solution.py

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.