Skip to content

Conversation

daviewales
Copy link
Contributor

WIP branch adding tests to Mount API for various backends.

@buhtz
Copy link
Member

buhtz commented Feb 17, 2025

Great. I am most of the days offline until next week. But i am on it

@daviewales daviewales force-pushed the mount-refactor-1-test-encfstools branch from 372913c to beaf7ec Compare February 18, 2025 00:40
@daviewales
Copy link
Contributor Author

Note that it's still WIP. I've added high-level tests for the 'local' backend, as it's the simplest. I'll work on adding tests for the remaining backends.

@daviewales daviewales force-pushed the mount-refactor-1-test-encfstools branch 2 times, most recently from 83e48f4 to ab70e8b Compare February 18, 2025 01:19
@buhtz buhtz added this to the 1.6.0 (2nd release from now) milestone Feb 22, 2025
@buhtz buhtz added the High label Mar 31, 2025
@buhtz buhtz added the Code Quality About code quality, refactoring, (unit) testing, linting, ... label Apr 2, 2025
@buhtz
Copy link
Member

buhtz commented Apr 25, 2025

  • I updated the branch to the latest dev.
  • I kind of recreated the new encode.py file so that its git history (from encfstools.py) is preserved. Because of a Microsoft GitHub bug you wont see this history at GitHub. But in your local branch you should see its history back to year 2012/13 with git log --follow encode.py (the --follow is important!).
  • Add encode.py to the list of files that will be checked for all linter rules.
  • Some minor adjustments.

I really like your tests. I can read and understand them very well. This is high quality.
I will dive a bit deeper. But for today I am finished. So you can work on your branch if you want to. I'll be back later.

@buhtz
Copy link
Member

buhtz commented Apr 26, 2025

I don't understand the purpose of MountWithLocalEncFS.test_unconfigured_mount(). What is the difference between "unconfigured" and "configured" in context of EncFS?

@buhtz buhtz added the Feedback needs user response, may be closed after timeout without a response label Apr 26, 2025
@daviewales
Copy link
Contributor Author

Unconfigured corresponds to the first run, before the BiT configuration or the EncFS directory is initialised.

Configured corresponds to later runs, where there is a preexisting configuration and EncFS directory.

@buhtz
Copy link
Member

buhtz commented Apr 27, 2025

Unconfigured corresponds to the first run, before the BiT configuration or the EncFS directory is initialised.

Configured corresponds to later runs, where there is a preexisting configuration and EncFS directory.

There is this out-commented line in test_mount.py

# unconfigured_mount = mount.Mount(cfg=cfg, tmp_mount=True)

To my unerstanding cfg here is configured for local-encfs. So how can it be unconfigured. I still don't get it, sorry.

I don't know that the desired test result could be for test_unconfigured_mount(). But I also don't understand all the mount behavior of BIT. Have not touched that part of the code base ever.

If you can be more specific with your questions and needs I might be able to help.

@daviewales
Copy link
Contributor Author

daviewales commented May 13, 2025

I've had a chance to look at this. 'Unconfigured' in this case refers to the EncFS configuration, rather than the BackInTime configuration. Yes, the BackInTime configuration is reused, but the EncFS mount has not yet been created. Perhaps I should rename it to test_uninitialised_mount()?

Edit:

Specifically, an initialised backup location will contain the file .encfs6.xml, while an uninitialised backup location will not.

@buhtz
Copy link
Member

buhtz commented May 13, 2025

"uninitialized" sounds good to me.

@buhtz
Copy link
Member

buhtz commented Jun 7, 2025

Hello David,
Can you please give me a short update about this PR?
Regards,
Christian

@daviewales
Copy link
Contributor Author

I haven't had much chance to work on the lately. The latest commit is work in progress, as the test I'm adding still needs some work to make it pass. In theory, it is supposed to create a new EncFS mount, and confirm that it was created.

@buhtz buhtz removed the Feedback needs user response, may be closed after timeout without a response label Jun 8, 2025
@daviewales daviewales force-pushed the mount-refactor-1-test-encfstools branch 3 times, most recently from 99f645a to a851399 Compare July 9, 2025 22:16
@buhtz
Copy link
Member

buhtz commented Jul 10, 2025

Hello David,
in the last days, I was quit active with refactoring. Have not done this if I had knew that you are working currently.

I am finished now and hope I have not interfered your work to much with conflicts.

Best,
Christian

@daviewales
Copy link
Contributor Author

Don't worry about me! Conflicts are expected with a slow moving branch like this. (And there weren't many.)

@daviewales daviewales force-pushed the mount-refactor-1-test-encfstools branch from 18ba540 to 556ddf4 Compare July 14, 2025 06:41
@daviewales
Copy link
Contributor Author

I'm getting a R1732 lint warning when creating a temporary directory, but I can't seem to disable the warning with noqa.

@buhtz
Copy link
Member

buhtz commented Jul 14, 2025

Which linter?
If pylint use "#pylint: disable=R1732"

Or follow the error and use "with"

Sorry. I am at holiday just using a touch device

@daviewales daviewales force-pushed the mount-refactor-1-test-encfstools branch from 556ddf4 to dbd204a Compare July 15, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Quality About code quality, refactoring, (unit) testing, linting, ... High

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants