-
Notifications
You must be signed in to change notification settings - Fork 123
shell recorder test cases fail if spec mounted #1975
Comments
This commit tries to reproduce the problem described in issue ElektraInitiative#1975.
This commit tries to reproduce the problem described in issue ElektraInitiative#1975. # Conflicts: # .travis.yml
This commit tries to reproduce the problem described in issue ElektraInitiative#1975. # Conflicts: # .travis.yml
This commit tries to reproduce the problem described in issue ElektraInitiative#1975. # Conflicts: # .travis.yml
I tried to reproduce the issue using simple kdb mount "$PWD/src/tools/gen/tests/lift.ini" spec/lift ni
kdb export spec > /tmp/spec.dump
kdb rm -r spec
kdb import spec < /tmp/spec.dump . |
Could you reproduce it with these commands? There should be no difference between mounting or importing a file (in the resulting KDB). |
Yes.
So, the commands from my comment above should work without problems? |
Thank you for your help! I misunderstood what you wanted to do. So above commands (after mount) should reproduce what the shell recorder does? (while it is failing?) If so, yes, in your commands I now get the same error like the shell recorder. I did not get the same error before, because user/sw/kdb/current/format said ni (and thus the export was in ni, and there was no error at the import). lift.ini (in the source) is removed when using the dump plugin. It'll need further investigation. |
Correct. |
It seems like there are cascading keys in the export where the import fails. This is related to #51 Why do we export and import spec in the first place? There are many plugins that do not completely restore the formatting, so we should not do such things unless absolutely necessary. Do we have MountpointRoot as / somewhere? It should be always below /tests/ see #1887. |
That’s because we want to keep the configuration just like it was before. One method to do that is to export the configuration before a test and re-import it afterwards.
We always use
That depends on the test, but many Markdown Shell Recorder test use something like
I know 😊. |
Yes, it is perfectly okay if this is done for the parts where tests actually write to.
Unfortunately there is: it depends on which plugins are used locally. Not all plugins can keep formatting and order. A complete and safe rewrite of all configuration settings is of course a goal but we cannot know what people do locally (they can write their own broken plugins).
That should be fine and not effect |
That is the case, since we export and import the whole configuration regardless of the content of a Shell Recorder test. By the way, we do the same in |
Afaik, this only exports the whole configuration but does not import it again, unless IMPORTCONFIG is set. I did not find a place where it is set except in the shell recorder, which causes the trouble as reported here. What do you think about #1985? It makes a lot of sense to have a backup of the configuration, I do not want to change that. |
I guess this update should fix the problem. Looks good to me. |
Steps to Reproduce the Problem
(~e is Elektra source, ~b is Elektra build dir)
Expected Result
No error when executing test cases.
Actual Result
System Information
Further Log Files and Output
The text was updated successfully, but these errors were encountered: