Skip to content

Conversation

@townsend2010
Copy link
Contributor

This is a first step to help organize the client cli tests and make them more manageable.

@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.83%. Comparing base (862f44f) to head (9980d57).
Report is 4603 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2348   +/-   ##
=======================================
  Coverage   84.83%   84.83%           
=======================================
  Files         205      205           
  Lines       10216    10216           
=======================================
  Hits         8667     8667           
  Misses       1549     1549           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a rebase, and a s/2021/2022/ in the headers :)

Noice otherwise :)

@Saviq
Copy link
Collaborator

Saviq commented Jan 28, 2022

@townsend2010 bump?

@townsend2010
Copy link
Contributor Author

Due to the changes I made for the authentication stuff, a MockPlatform needs to be defined before
StrictMock<MockDaemonRpc> mock_daemon in ClientTestFixture so the set_server_socket_restrictions() call in theDaemonRpc ctor can be mocked. However, due to how the singleton boiler plate is currently done, this MockPlatform definition cannot be done in a header due to the following error:

In file included from /home/townsend/multipass/multipass/tests/client/test_cli_client.cpp:18:
/home/townsend/multipass/multipass/tests/client/client_test_fixture.h:81:8: error: ‘multipass::test::ClientTestFixture’ has a field ‘multipass::test::ClientTestFixture::platform_attr’ whose type uses the anonymous namespace [-Werror=subobject-linkage]
   81 | struct ClientTestFixture : public Test
      |        ^~~~~~~~~~~~~~~~~

One of the main points of this refactoring is to move the MockDaemonRpc object into a class (ClientTestFixture) in a shared header and removing this defeats the purpose of most of this refactoring. Until this issue can be overcome, I think this should wait.

@townsend2010 townsend2010 marked this pull request as draft January 28, 2022 16:21
@jibel jibel requested a review from andrei-toterman January 16, 2025 15:56
@jibel
Copy link
Collaborator

jibel commented Jan 16, 2025

@andrei-toterman to review what this PR is about and close it.

@andrei-toterman
Copy link
Contributor

I don't think these changes are still relevant today. Those changes are splitting a test file into multiple test files, but the current efforts are about splitting out the test executable itself into multiple test executables. While the changes themselves make sense, they are very out of date. So we can still split up a file into multiple files just for easier development, but I think it would be too difficult to build on top of this PR.

@andrei-toterman andrei-toterman removed their request for review February 13, 2025 11:15
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.

5 participants