Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: fix string creation from '0' in LogEntry #55905

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

ronen-fr
Copy link
Contributor

@ronen-fr ronen-fr commented Mar 3, 2024

C++23 disallows conversion from 'int' to 'string'.

That includes returning '0' from a function that returns a string.

@ronen-fr
Copy link
Contributor Author

ronen-fr commented Mar 4, 2024

jenkins test make check

src/common/LogEntry.cc Outdated Show resolved Hide resolved
C++23 disallows conversion from 'int' to 'string'.
That includes returning '0' from a function that returns a string.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

thanks. lgtm.

@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

tests/test_host.py .F

_______________________ HostControllerTest.test_add_host _______________________

self = <dashboard.tests.test_host.HostControllerTest testMethod=test_add_host>
mock_add_host = <MagicMock name='add_host' id='140354858718240'>

    @mock.patch('dashboard.controllers.host.add_host')
    def test_add_host(self, mock_add_host):
        with patch_orch(True):
            payload = {
                'hostname': 'node0',
                'addr': '192.0.2.0',
                'labels': 'mon',
                'status': 'maintenance'
            }
            self._post(self.URL_HOST, payload, version=APIVersion(0, 1))
>           self.assertStatus(201)

tests/test_host.py:289: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py3/lib/python3.10/site-packages/cheroot/test/webtest.py:323: in assertStatus
    self._handlewebError(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <dashboard.tests.test_host.HostControllerTest testMethod=test_add_host>
msg = 'Status 400 Bad Request does not match 201'

    def _handlewebError(self, msg):  # noqa: C901  # FIXME
        print('')
        print('    ERROR: %s' % msg)
    
        if not self.interactive:
>           raise self.failureException(msg)
E           AssertionError: Status 400 Bad Request does not match 201

@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

jenkins test make check

@ronen-fr
Copy link
Contributor Author

ronen-fr commented Mar 5, 2024

jenkins test make check

@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

change in a dead-end branch -- so no need to test with teuthology. i am merging it to unblock #55886

@tchaikov tchaikov merged commit 6c9d1b6 into ceph:main Mar 5, 2024
11 checks passed
@ronen-fr
Copy link
Contributor Author

ronen-fr commented Mar 5, 2024

change in a dead-end branch -- so no need to test with teuthology. i am merging it to unblock #55886

@tchaikov - I've just finished a successful round of Teuthology tests...

@ronen-fr ronen-fr deleted the wip-rf-23a branch March 5, 2024 12:28
@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

thanks for testing it. even better =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants