Closed pSchlarb closed 2 years ago
Can one of the admins verify this patch?
Other than that I'm thinking we should have the pytest settings pre-configured so the development environment is more complete from the start.
@WadeBarnes Do you mean providing the workspace settings.json for VScode ? Its a good idea and already thought about it, but i am not quite sure. If yes should it only be minimal settings for the tests or more customized? Could it be problematic providing settings that don't work well with other settings? To be honest i haven't that much experience with VSCode.
Other than that I'm thinking we should have the pytest settings pre-configured so the development environment is more complete from the start.
@WadeBarnes Do you mean providing the workspace settings.json for VScode ? Its a good idea and already thought about it, but i am not quite sure. If yes should it only be minimal settings for the tests or more customized? Could it be problematic providing settings that don't work well with other settings? To be honest i haven't that much experience with VSCode.
Yes, I was thinking some minimum settings for the tests, at least to start. It shouldn't be an issue since they would be meant to run in the dev container which is where we get the consistency for the development environment.
Hm I think we would have to create a pytest.ini
since as i looked it isn't possible to set 2 working directories for the test discovery with the vscode settings.
I'm also looking into some issues running the tests in the container. Some tests "appear" to fail with a "Test result not found" error, when in fact they either pass or are skipped as expected. You can see the true summary in the Output - Python Test Log console. The issue appears to be a bug in the https://github.com/microsoft/vscode-python extension. There have already been some fixes for related issues.
I've confirmed (through the Output - Python Test Log console) all of the tests pass or are skipped as expected. Some of the indy_node
tests fail if they are all run at once, which we know happens and is one of the reasons we split up the tests in the GHA workflow(s) as well.
The tests affected by the "Test result not found" issue are marked with a red circle with a red dot in the middle rather than a red circle with a red x
inside. All of the affected tests are parameterized tests, although in some cases there are some tests within the same group where the test results are found and others where the test results are not found. For example:
The "Test result not found" issue does not affect the ability to run the tests in debug mode and set breakpoints to step through the code.
@pSchlarb, Could you also add some documentation to the top of the Dev Setup document about using the VSCode Devcontainer environment as the preferred method to create a development environment and get started with the code?
The issues with the tests have been marked as a known issue here; https://github.com/hyperledger/indy-node/issues/1729
Request for documentation has been added as a separate issue here; https://github.com/hyperledger/indy-node/issues/1728
Addition of VSCode Devcontainer files. Signed-off-by: Philipp Schlarb p.schlarb@esatus.com