-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat(tests): new e2e tests [3/N] #1720
Conversation
|
||
using namespace libsinsp::runc; | ||
|
||
constexpr const cgroup_layout CRI_CGROUP_LAYOUT[] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Is re-defining those in the test setup not defying the purpose of e2e tests? We should import the definitions from libs instead.
test/libsinsp_e2e/thread_state.cpp
Outdated
// This just verifies that the mechanism of wait_for with a | ||
// timeout actually works in the face of a thread that never | ||
// stops | ||
void loop_almost_forever() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
test/libsinsp_e2e/docker_utils.cpp
Outdated
|
||
using namespace std; | ||
|
||
bool dutils_check_docker() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Outlook]: I believe we could easily add similar tests for containerd
and cri-o
in follow up PRs, and simulate running pod sand boxes using crictl
https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md -> It never fails me for quick testing and is so much easier than requiring an entire Kubernetes setup.
test/libsinsp_e2e/resources/docker/large_container_dockerfiles/Dockerfile.long_labels
Outdated
Show resolved
Hide resolved
test/libsinsp_e2e/container.cpp
Outdated
before_close_t cleanup = [&](sinsp* inspector) | ||
{ inspector->set_docker_socket_path("/var/run/docker.sock"); }; | ||
|
||
ASSERT_NO_FATAL_FAILURE({ event_capture::run(test, callback, filter, setup, cleanup); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also in this test container_docker_bad_socket
could we at least assert that the socket is bad and what else would make sense to assert (for example assert that container_info->m_image
is empty etc)? It seems like the exact same assertions as for the successful docker socket, which is what we want to assert 100% as well.
1489e75
to
f2b508d
Compare
5d60c0b
to
d05d092
Compare
Signed-off-by: Roberto Scolaro <[email protected]>
8f07331
to
106828f
Compare
Signed-off-by: Roberto Scolaro <[email protected]>
9ded6fe
to
688dda2
Compare
4ecb67c
to
6fcacfa
Compare
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
6fcacfa
to
72ed004
Compare
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
39ea443
to
c800add
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
LGTM label has been added. Git tree hash: c8a2b6571169d5eabd3345a0662bdaea5e1a07c8
|
/milestone 0.16.0 |
uint32_t json_len = json.length() + 1; | ||
size_t totlen = sizeof(scap_evt) + sizeof(uint32_t) + json_len; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there are reason behind this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That fixes a misaligned access (discovery provided by ASAN :) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhm got it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, therealbobo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This add e2e tests related to paths.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: