-
Notifications
You must be signed in to change notification settings - Fork 100
Support get local image by containerd #348
Support get local image by containerd #348
Conversation
2e1742a
to
ea1b60c
Compare
28d03c5
to
58fe5c7
Compare
@knqyf263 e2e test passed, i need write unit test for containerd daemon, should i add code on this project? https://github.com/aquasecurity/testdocker |
@mowangdk Yes, it would be great. You can create a new directory |
58fe5c7
to
8c60dab
Compare
@knqyf263 i wonder if there is any other ways to complete auto tests such as add test case in e2e tests? Because containerd official repo does not provide any mock interfaces. there are many interfaces need to mock which requires a lot of work |
@knqyf263 I'll keep writing the mock interface if there's no other way, but it takes a long time。。 |
Can we emulate containerd only for necessary APIs? |
@knqyf263 I was intent to do this, but containerd is designed with a complex interface and it is incompatible with the docker. So i am going to create an interface on the client side to wrap all the methods provided by containerd. mock these method on the new interface |
Is there any tool supporting containerd? We may want to see how those tools test communication with containerd. |
How do they test containerd? |
|
What if we give up unit tests and focus on integration tests? We may want to run containerd as a container as follows. Also, you can refer to this Dockerfile. |
gotcha, I think this is a better way, I will refer to the |
Thanks for your efforts. |
8c60dab
to
328854a
Compare
ur welcome~ |
Hello Guys. |
not finish yet, in the process of writing integration tests |
@knqyf263 I have encountered a new problem, please advise how to solve. i can't access the socket path outside the container (the path is already shared) This issue prevents me from using testcontainer to access containerd,containerd will throws this error |
Did you try Privileged=true? |
…tainerd_daemon # Conflicts: # go.mod # test/integration/registry_test.go
image/daemon.go
Outdated
defaultContainerdSocket = "/run/containerd/containerd.sock" | ||
defaultContainerdNamespace = "default" |
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.
These values should be in containerd.go
.
fcfa1bb
to
e7e1000
Compare
Sorry, I've been busy with work lately. unable to follow up in time 😭 |
@mowangdk Thank you so much! |
Fix aquasecurity/trivy#851
done:
code develop
e2e test
Current state:
add unit test