This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
increase unit test coverage on create.go #401
Labels
Comments
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 14, 2017
Add a simple test framework to allow the behaviour of the virtcontainers package to be mocked. This change introduces a RVC interface and provides two implementations: one for virtcontainers itself (rvc-implementation.go) and another mock implementation for the tests to allow the behaviour of the virtcontainers package to be modified (rvc-implementation_test.go). By only accessing the virtcontainers implementation via the "vci" variable, the tests can be switched to the mock implementation. Note that this mocking is used rather than testing virtcontainers directly since the virtcontainers API is already tested in that package: the mock framework thus avoids duplication of test code and allows more fine-grained error scenarios to be handled. This change also introduces a single new test, TestCreate(), that increases the unit test coverage of create.go by using the new framework to force create() to fail due to a virtcontainers failure in CreatePod(). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 14, 2017
Add a simple test framework to allow the behaviour of the virtcontainers package to be mocked. This change introduces a RVC interface and provides two implementations: one for virtcontainers itself (rvc-implementation.go) and another mock implementation for the tests to allow the behaviour of the virtcontainers package to be modified (rvc-implementation_test.go). By only accessing the virtcontainers implementation via the "vci" variable, the tests can be switched to the mock implementation. Note that this mocking is used rather than testing virtcontainers directly since the virtcontainers API is already tested in that package: the mock framework thus avoids duplication of test code and allows more fine-grained error scenarios to be handled. This change also introduces a single new test, TestCreate(), that increases the unit test coverage of create.go by using the new framework to force create() to fail due to a virtcontainers failure in CreatePod(). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 14, 2017
Add a simple test framework to allow the behaviour of the virtcontainers package to be mocked. This change introduces a RVC interface and provides two implementations: one for virtcontainers itself (rvc-implementation.go) and another mock implementation for the tests to allow the behaviour of the virtcontainers package to be modified (rvc-implementation_test.go). By only accessing the virtcontainers implementation via the "vci" variable, the tests can be switched to the mock implementation. Note that this mocking is used rather than testing virtcontainers directly since the virtcontainers API is already tested in that package: the mock framework thus avoids duplication of test code and allows more fine-grained error scenarios to be handled. This change also introduces a single new test, TestCreate(), that increases the unit test coverage of create.go by using the new framework to force create() to fail due to a virtcontainers failure in CreatePod(). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 14, 2017
Add a simple test framework to allow the behaviour of the virtcontainers package to be mocked. This change introduces a RVC interface and provides two implementations: one for virtcontainers itself (rvc-implementation.go) and another mock implementation for the tests to allow the behaviour of the virtcontainers package to be modified (rvc-implementation_test.go). By only accessing the virtcontainers implementation via the "vci" variable, the tests can be switched to the mock implementation. Note that this mocking is used rather than testing virtcontainers directly since the virtcontainers API is already tested in that package: the mock framework thus avoids duplication of test code and allows more fine-grained error scenarios to be handled. This change also introduces a single new test, TestCreate(), that increases the unit test coverage of create.go by using the new framework to force create() to fail due to a virtcontainers failure in CreatePod(). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 14, 2017
Add a simple test framework to allow the behaviour of the virtcontainers package to be mocked. This change introduces a RVC interface and provides two implementations: one for virtcontainers itself (rvc-implementation.go) and another mock implementation for the tests to allow the behaviour of the virtcontainers package to be modified (rvc-implementation_test.go). By only accessing the virtcontainers implementation via the "vci" variable, the tests can be switched to the mock implementation. Note that this mocking is used rather than testing virtcontainers directly since the virtcontainers API is already tested in that package: the mock framework thus avoids duplication of test code and allows more fine-grained error scenarios to be handled. This change also introduces a single new test, TestCreate(), that increases the unit test coverage of create.go by using the new framework to force create() to fail due to a virtcontainers failure in CreatePod(). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 14, 2017
Add a simple test framework to allow the behaviour of the virtcontainers package to be mocked. This change introduces a RVC interface and provides two implementations: one for virtcontainers itself (rvc-implementation.go) and another mock implementation for the tests to allow the behaviour of the virtcontainers package to be modified (rvc-implementation_test.go). By only accessing the virtcontainers implementation via the "vci" variable, the tests can be switched to the mock implementation. Note that this mocking is used rather than testing virtcontainers directly since the virtcontainers API is already tested in that package: the mock framework thus avoids duplication of test code and allows more fine-grained error scenarios to be handled. This change also introduces a single new test, TestCreate(), that increases the unit test coverage of create.go by using the new framework to force create() to fail due to a virtcontainers failure in CreatePod(). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 23, 2017
Added 18 new tests. Coverage (when run as root) is 87.1% (actually, it's higher since some tests require non-root to run). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 23, 2017
Added 18 new tests. Coverage (when run as root) is 87.1% (actually, it's higher since some tests require non-root to run). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 23, 2017
Added 18 new tests. Coverage (when run as root) is 90.3% (actually, it's higher since some tests require non-root to run). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 23, 2017
Added 19 new tests. Coverage (when run as root) is 90.3% (actually, it's higher since some tests require non-root to run). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 24, 2017
Added 19 new tests. Coverage (when run as root) is 90.3% (actually, 94.6% when combining root and non-root test runs (some tests require non-root to run)). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel
added a commit
to jodh-intel/runtime
that referenced
this issue
Aug 24, 2017
Added 19 new tests. Coverage (when run as root) is 90.3% (actually, 94.6% when combining root and non-root test runs (some tests require non-root to run)). Fixes clearcontainers#401. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
mcastelino
pushed a commit
to mcastelino/runtime
that referenced
this issue
Dec 6, 2018
1. Fix config installation not exec permission is needed. 2. Makefile install all in DESTDIR. make install DESTDIR=/tmp/dest/ Before: $tree /tmp/dest/ /tmp/dest/ └── usr ├── bin │ └── kata-collect-data.sh └── share └── defaults └── kata-containers └── configuration.toml 5 directories, 2 files Now: $tree /tmp/dest/ /tmp/dest/ └── usr ├── local │ └── bin │ ├── kata-collect-data.sh │ └── kata-runtime └── share ├── bash-completion │ └── completions │ └── kata-runtime └── defaults └── kata-containers └── configuration.toml Fixes: clearcontainers#401 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Currently very low coverage.
See #93.
The text was updated successfully, but these errors were encountered: