Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

virtcontainers: Move unit tests for types/sandbox.go #2853

Merged

Conversation

cmaf
Copy link
Contributor

@cmaf cmaf commented Jul 23, 2020

Move unit tests that were in virtcontainers/sandbox_test.go relating to Socket, Volume, and SandboxState to types/sandbox_test.go.

Changed testSandboxStateTransition function to use SandboxState only instead of Sandbox from virtcontainers/sandbox.go.

Fixes #2852

Signed-off-by: Chelsea Mafrica [email protected]

@cmaf cmaf added the wip Work in Progress (PR incomplete - needs more work or rework) label Jul 23, 2020
@auto-comment
Copy link

auto-comment bot commented Jul 23, 2020

Thank you for raising your pull request. Please note that the main development of Kata Containers has moved to the 2.0-dev branch of https://github.com/kata-containers/kata-containers repository. The kata-containers/runtime repository is kept for 1.x release maintenance. Please check twice if your change should go to the 2.0-dev branch directly.

If it is strongly required for adding the change to Kata Containers 1.x releases, please ping @kata-containers/runtime to assign a dedicated developer to be responsible for porting the change to 2.0-dev branch. Thanks!

@cmaf cmaf force-pushed the unittest-virtcontainers-sandbox branch from 947b5e0 to c05cf81 Compare July 23, 2020 23:56
@cmaf
Copy link
Contributor Author

cmaf commented Jul 24, 2020

/test-ubuntu

Chelsea Mafrica added 2 commits July 24, 2020 00:11
Move unit tests that were in virtcontainers/sandbox_test.go relating
to Socket, Volume, and SandboxState to types/sandbox_test.go.

Change testSandboxStateTransition function to use SandboxState only
instead of Sandbox from virtcontainers/sandbox.go.

Fixes kata-containers#2852

Signed-off-by: Chelsea Mafrica <[email protected]>
Remove tests from virtcontainers/sandbox_test.go which were moved to
virtcontainers/types/sandbox_test.go.

Signed-off-by: Chelsea Mafrica <[email protected]>
@cmaf cmaf force-pushed the unittest-virtcontainers-sandbox branch from c05cf81 to 345d0c2 Compare July 24, 2020 00:17
@cmaf
Copy link
Contributor Author

cmaf commented Jul 24, 2020

/test-ubuntu

@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #2853 into master will increase coverage by 0.43%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2853      +/-   ##
==========================================
+ Coverage   50.62%   51.05%   +0.43%     
==========================================
  Files         118      118              
  Lines       17367    17367              
==========================================
+ Hits         8792     8867      +75     
+ Misses       7497     7422      -75     
  Partials     1078     1078              

Add tests for state change, empty string failures for Volumes and
Sockets. Change two function names to accurately reflect tests.

Signed-off-by: Chelsea Mafrica <[email protected]>
@cmaf cmaf added needs-review Needs to be assessed by the team. and removed wip Work in Progress (PR incomplete - needs more work or rework) labels Jul 24, 2020
@cmaf
Copy link
Contributor Author

cmaf commented Jul 24, 2020

/test-ubuntu

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cmaf.

lgtm

@jodh-intel jodh-intel merged commit 032d537 into kata-containers:master Jul 28, 2020
@cmaf
Copy link
Contributor Author

cmaf commented Sep 1, 2020

Forward port: kata-containers/kata-containers#450

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-review Needs to be assessed by the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some sandbox unit tests should be in a different directory
3 participants