virtcontainers: fix unit tests#193
Conversation
|
Can you correct typo in commit message /nooAgent/noopAgent/ |
5153ad2 to
65bb7ec
Compare
|
@amshinde done, thanks |
89f8c69 to
62220a4
Compare
virtcontainers/container_test.go
Outdated
| } | ||
|
|
||
| if container.state.Fstype == "" || !container.state.HotpluggedDrive { | ||
| if container.state.Fstype != "" && container.state.HotpluggedDrive { |
There was a problem hiding this comment.
So you are actually checking here that the drive is not hotplugged, which changes what the test is supposed to verify.
I think you need to add a noopAgent for the pod and have the noopAgent advertise the block support for the test.
62220a4 to
92fa5e9
Compare
|
lgtm |
Use noopAgent in unit tests to add online fake resources. Fix unit tests according with new changes introduced recently. fixes kata-containers#192 Signed-off-by: Julio Montes <julio.montes@intel.com>
797bb07 to
16fd7bb
Compare
|
@devimc CI not passing because of CNI unit tests. |
|
kata-containers/tests#219 makes the CI to run the virtcontainers unit tests with root user only. But now I see a panic in the CI logs of the ubuntu 16.04 job. and an issue with the |
| } | ||
| } | ||
|
|
||
| func (c *Container) checkBlockDeviceSupport() bool { |
There was a problem hiding this comment.
@bergwolf Without this factorization we need to introduce changes in the noopAgent implementation to support capabilities related to block device support since this code was moved into hotplugDrive which we are testing here. I think this is not necessary since we anyways need to factorize and reuse in #138. So I have moved it here to avoid the unnecessary implementation changes for noopAgent.
|
For the PID log fix that was btw... |
0e299a9 to
656e520
Compare
Factorize configuration and hardware support for hotplugging block devices into a single function and use that. Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
in order to make log-parser happy, mockcontainer must return always a valid process with a fake PID, since log-parser checks that PID value in the logs and it must be different to zero Depends-on: github.com/kata-containers/tests#226 Signed-off-by: Julio Montes <julio.montes@intel.com>
656e520 to
dacc175
Compare
Codecov Report
@@ Coverage Diff @@
## master #193 +/- ##
=========================================
Coverage ? 66.47%
=========================================
Files ? 70
Lines ? 7535
Branches ? 0
=========================================
Hits ? 5009
Misses ? 1986
Partials ? 540
Continue to review full report at Codecov.
|
|
@sboeuf Can we merge this one? |
Virtcontainers unit tests only work if they are executed using the root user. Fixes clearcontainers#218. Depends-on: github.com/kata-containers/runtime#193 Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
ListProcesses returns a list of running processes inside the container, this function should be called by the runtime in the ps command implementation. fixes kata-containers#193 Signed-off-by: Julio Montes <julio.montes@intel.com>
Fix unit tests according with new changes introduced recently.
Use noopAgent in unit tests to add online fake resources.
Factorize configuration and hardware support for hotplugging block
devices into a single function and use that.
fixes #192
Signed-off-by: Archana Shinde archana.m.shinde@intel.com
Signed-off-by: Julio Montes julio.montes@intel.com