Skip to content

Commit

Permalink
Minor code cleanup.
Browse files Browse the repository at this point in the history
Signed-off-by: Lantao Liu <lantaol@google.com>
  • Loading branch information
Random-Liu committed Jan 18, 2018
1 parent ca3b738 commit 6fadb7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions pkg/annotations/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package annotations

// ContainerType values
// Following OCI annotations are used by katacontainers now.
// We'll switch to standard secure pod API after it is defined in CRI.
const (
// ContainerTypeSandbox represents a pod sandbox container
ContainerTypeSandbox = "sandbox"
Expand Down
12 changes: 6 additions & 6 deletions pkg/server/container_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ func TestGeneralContainerSpec(t *testing.T) {
testPid := uint32(1234)
config, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
c := newTestCRIContainerdService()
testSandboxID := "SandboxID"
testSandboxID := "sandbox-id"
spec, err := c.generateContainerSpec(testID, testSandboxID, testPid, config, sandboxConfig, imageConfig, nil)
require.NoError(t, err)
specCheck(t, testID, testSandboxID, testPid, spec)
}

func TestContainerCapabilities(t *testing.T) {
testID := "test-id"
testSandboxID := "SandboxID"
testSandboxID := "sandbox-id"
testPid := uint32(1234)
config, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
c := newTestCRIContainerdService()
Expand Down Expand Up @@ -262,7 +262,7 @@ func TestContainerCapabilities(t *testing.T) {

func TestContainerSpecTty(t *testing.T) {
testID := "test-id"
testSandboxID := "SandboxID"
testSandboxID := "sandbox-id"
testPid := uint32(1234)
config, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
c := newTestCRIContainerdService()
Expand All @@ -282,7 +282,7 @@ func TestContainerSpecTty(t *testing.T) {

func TestContainerSpecReadonlyRootfs(t *testing.T) {
testID := "test-id"
testSandboxID := "SandboxID"
testSandboxID := "sandbox-id"
testPid := uint32(1234)
config, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
c := newTestCRIContainerdService()
Expand All @@ -297,7 +297,7 @@ func TestContainerSpecReadonlyRootfs(t *testing.T) {

func TestContainerSpecWithExtraMounts(t *testing.T) {
testID := "test-id"
testSandboxID := "SandboxID"
testSandboxID := "sandbox-id"
testPid := uint32(1234)
config, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
c := newTestCRIContainerdService()
Expand Down Expand Up @@ -701,7 +701,7 @@ func TestMountPropagation(t *testing.T) {
func TestPidNamespace(t *testing.T) {
testID := "test-id"
testPid := uint32(1234)
testSandboxID := "SandboxID"
testSandboxID := "sandbox-id"
config, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
c := newTestCRIContainerdService()
t.Logf("should not set pid namespace when host pid is true")
Expand Down

0 comments on commit 6fadb7f

Please sign in to comment.