croconut / godot-tester

A Github Action to handle testing Godot applications with GUT
MIT License
36 stars 14 forks source link

Writing a file fails test #19

Open Structed opened 2 years ago

Structed commented 2 years ago

Description

I have a test, which writes a file to a path similar to res://tests/temp/config.cfg. I also run


func after_each():
    directory.remove(path)

to remove the file after every single test execution.

This works fine on my local machine. However, it does not with godot-tester.

I assume this is due to file system permissions on the container?

Expected Behaviour

Actual Behaviour

Test fails:

[Failed]:  
      at line -1

Repro

Comment out this test and run on GitHub Action

Repro Test: https://github.com/Structed/godot-playfab/blob/db0ca9f1e1ee170080394fa8ed21bd7a22778a34/addons/godot-playfab/test/unit/PlayFabClientConfig/test_PlayFabClientConfigLoader.gd#L13

croconut commented 1 year ago

Will add as a test goal. We should be able to enable file writing from tests as this action has no secrets that can be exploited.

That said, solution may requires tests to be run with a specific file path