Currently the integration tests sometimes (or always?) fail with the following error. Haven't had a chance to look in in more detail, but we probably shouldn't be testing the logs so closely.
________________________________ test_snap_logs ________________________________
Traceback (most recent call last):
File "/ops-libs-test/tests/integration/test_snap.py", line 138, in test_snap_logs
assert len(kp.logs(num_lines=15).splitlines()) == 15
AssertionError: assert 12 == 15
+ where 12 = len(['2023-01-23T04:15:24Z systemd[1]: Started Service for snap application kube-proxy.daemon.', '2023-01-23T04:15:25Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...', '2023-01-23T04:15:25Z systemd[1]: snap.kube-proxy.daemon.service: Succeeded.', '2023-01-23T04:15:25Z systemd[1]: Stopped Service for snap application kube-proxy.daemon.', '2023-01-23T04:15:26Z systemd[1]: Started Service for snap application kube-proxy.daemon.', '2023-01-23T04:15:26Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...', ...])
+ where ['2023-01-23T04:15:24Z systemd[1]: Started Service for snap application kube-proxy.daemon.', '2023-01-23T04:15:25Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...', '2023-01-23T04:15:25Z systemd[1]: snap.kube-proxy.daemon.service: Succeeded.', '2023-01-23T04:15:25Z systemd[1]: Stopped Service for snap application kube-proxy.daemon.', '2023-01-23T04:15:26Z systemd[1]: Started Service for snap application kube-proxy.daemon.', '2023-01-23T04:15:26Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...', ...] = <built-in method splitlines of str object at 0x12f1450>()
+ where <built-in method splitlines of str object at 0x12f1450> = '2023-01-23T04:15:24Z systemd[1]: Started Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:25Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...\n2023-01-23T04:15:25Z systemd[1]: snap.kube-proxy.daemon.service: Succeeded.\n2023-01-23T04:15:25Z systemd[1]: Stopped Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:26Z systemd[1]: Started Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:26Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...\n2023-01-23T04:15:26Z systemd[1]: snap.kube-proxy.daemon.service: Succeeded.\n2023-01-23T04:15:26Z systemd[1]: Stopped Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:26Z systemd[1]: Started Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:27Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...\n2023-01-23T04:15:27Z systemd[1]: snap.kube-proxy.daemon.service: Succeeded.\n2023-01-23T04:15:27Z systemd[1]: Stopped Service for snap application kube-proxy.daemon.\n'.splitlines
+ where '2023-01-23T04:15:24Z systemd[1]: Started Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:25Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...\n2023-01-23T04:15:25Z systemd[1]: snap.kube-proxy.daemon.service: Succeeded.\n2023-01-23T04:15:25Z systemd[1]: Stopped Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:26Z systemd[1]: Started Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:26Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...\n2023-01-23T04:15:26Z systemd[1]: snap.kube-proxy.daemon.service: Succeeded.\n2023-01-23T04:15:26Z systemd[1]: Stopped Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:26Z systemd[1]: Started Service for snap application kube-proxy.daemon.\n2023-01-23T04:15:27Z systemd[1]: Stopping Service for snap application kube-proxy.daemon...\n2023-01-23T04:15:27Z systemd[1]: snap.kube-proxy.daemon.service: Succeeded.\n2023-01-23T04:15:27Z systemd[1]: Stopped Service for snap application kube-proxy.daemon.\n' = <bound method Snap.logs of <charms.operator_libs_linux.v1.snap.Snap: {'_name': 'kube-proxy', '_state': <SnapState.Latest: 'latest'>, '_channel': 'latest/stable', '_revision': '2900', '_confinement': 'classic', '_cohort': '', '_apps': [{'snap': 'kube-proxy', 'name': 'daemon', 'daemon': 'simple', 'daemon-scope': 'system'}], '_snap_client': <charms.operator_libs_linux.v1.snap.SnapClient object at 0x7f1459031460>}>>(num_lines=15)
+ where <bound method Snap.logs of <charms.operator_libs_linux.v1.snap.Snap: {'_name': 'kube-proxy', '_state': <SnapState.Latest: 'latest'>, '_channel': 'latest/stable', '_revision': '2900', '_confinement': 'classic', '_cohort': '', '_apps': [{'snap': 'kube-proxy', 'name': 'daemon', 'daemon': 'simple', 'daemon-scope': 'system'}], '_snap_client': <charms.operator_libs_linux.v1.snap.SnapClient object at 0x7f1459031460>}>> = <charms.operator_libs_linux.v1.snap.Snap: {'_name': 'kube-proxy', '_state': <SnapState.Latest: 'latest'>, '_channel': 'latest/stable', '_revision': '2900', '_confinement': 'classic', '_cohort': '', '_apps': [{'snap': 'kube-proxy', 'name': 'daemon', 'daemon': 'simple', 'daemon-scope': 'system'}], '_snap_client': <charms.operator_libs_linux.v1.snap.SnapClient object at 0x7f1459031460>}>.logs