Closed y011d4 closed 3 years ago
I try managing separately todo.json
with environment variable, but it seems not working in some case.
We can use the other *.json
to test owing to #82 .
I will fix this problem by preparing *.json
file for test.
Thank you!
@y011d4
~I understand this bug.~
~I added configuration about task file path, then the priority of path is config setting task file path > XDG_DATA_HOME/todo.json
, but scenario test is tried evacuating the file with XDG_DATA_HOME
.~
~So, if you configure task file path, evacuation the file doesn't work in scenario test.~
~As mention, I will fix to use configuration.~ Thank you
I have mistaken about this bug.
As result, mentioned bug isn't reproduce in my environment.
scenario-test
use $GOPATH/src/github.com/dondakeshimo/todo-cli/test/scenario/todo/todo.json
specified by XDG_DATA_HOME
, then not only todo.json
but also config.yaml
is created for scenario-test
.
Please tell me your execution environment, especially XDG_DATA_HOME
environment value and todo conf --show_config | grep taskfilepath
value.
Thank you.
I tried to reproduce, but I couldn't... Things above might be my misunderstanding. I'm so sorry.
(python3-env-tCB1VNE7-py3.9) ~/g/g/y/todo-cli|master ❯ git log --oneline -1
b371066 (HEAD -> master, tag: v1.1.1, upstream/master) Merge pull request #100 from dondakeshimo/release/1.1.1
(python3-env-tCB1VNE7-py3.9) ~/g/g/y/todo-cli|master ❯ echo $XDG_DATA_HOME
/home/y011d4/.local/share
(python3-env-tCB1VNE7-py3.9) ~/g/g/y/todo-cli|master ❯ md5sum $XDG_DATA_HOME/todo/todo.json
988717cfa0b4ed2701821e4504d578d5 /home/y011d4/.local/share/todo/todo.json
(python3-env-tCB1VNE7-py3.9) ~/g/g/y/todo-cli|master ❯ make scenario-test
(snipped)
(python3-env-tCB1VNE7-py3.9) ~/g/g/y/todo-cli|master ❯ md5sum $XDG_DATA_HOME/todo/todo.json
988717cfa0b4ed2701821e4504d578d5 /home/y011d4/.local/share/todo/todo.json
@y011d4
Thank you for your checking and reporting. (Actually, I found the other bug when I tried reproducing this bug. c.f #99 )
I close this issue. Thank you!
When
make scenario-test
is run,todo.json
is overwritten by test case. I think this is unintended behavior for most people who try to run the test. To resolve this, there seems some options:todo.json
temporally when the test starts