Skip to content

Conversation

@john-
Copy link

@john- john- commented Jan 7, 2026

This PR enables the persisting of state information for all partitions.

The testing is done by executing the minimum needed MPD code in order to test the StateFile class. I would consider it integration testing.

The previous pull request for this functionality had testing that was more like system testing: The entire mpd applcation is loaded and interacted with via its inputs/outputs (e.g. configuration file).

High level notes:

  • test/meson.build was modified to create a testing library file that includes at least enough MPD to compile the test cases.

  • Mocking (gmock) is used for loading songs into the playlist and for mounting storage.

    Stock MPD functionality requires songs be in the MPD DB and use of valid storage. The mocking overrides this behavior for testing.

  • I reviewed the comments for the previous pull request and attempted to address them with this testing approach.

If there is too much basic stuff I am missing give me the feedback you have time for.

@john-
Copy link
Author

john- commented Jan 8, 2026

I am closing this to investigate an issue with how this interacts with myMPD on its first use of MPD with the new state file.

@john- john- closed this Jan 8, 2026
@john-
Copy link
Author

john- commented Jan 8, 2026

It turns out issue I encountered is unrelated to these mpd changes and unrelated to myMPD. The problem was a timing issue on boot when mounting my music library over nfs.

@john- john- reopened this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant