Skip to content

Commit

Permalink
runtime: Fix static check errors
Browse files Browse the repository at this point in the history
Fix comment formatting and unused variable to make static checks pass.

Fixes #1550

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
  • Loading branch information
cmaf committed Mar 25, 2021
1 parent f3ebbb1 commit 6fcfea8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/runtime/containerd-shim-v2/service_test.go
Expand Up @@ -19,12 +19,12 @@ import (
"github.com/stretchr/testify/assert"
)

func NewService(id string) (service, error) {
func newService(id string) (*service, error) {
ctx := context.Background()

ctx, cancel := context.WithCancel(ctx)

s := service{
s := &service{
id: id,
pid: uint32(os.Getpid()),
ctx: ctx,
Expand All @@ -43,16 +43,16 @@ func TestServiceCreate(t *testing.T) {

assert := assert.New(t)

tmpdir, err := ioutil.TempDir("", "")
tmpdir, _ := ioutil.TempDir("", "")
defer os.RemoveAll(tmpdir)

bundleDir := filepath.Join(tmpdir, "bundle")
err = makeOCIBundle(bundleDir)
err := makeOCIBundle(bundleDir)
assert.NoError(err)

ctx := context.Background()

s, err := NewService("foo")
s, err := newService("foo")
assert.NoError(err)

for i, d := range ktu.ContainerIDTestData {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/pkg/katatestutils/utils.go
Expand Up @@ -53,7 +53,7 @@ type ContainerIDTestDataType struct {
Valid bool
}

// Set of test data that lists valid and invalid Container IDs
// ContainerIDTestData is a set of test data that lists valid and invalid Container IDs
var ContainerIDTestData = []ContainerIDTestDataType{
{"", false}, // Cannot be blank
{" ", false}, // Cannot be a space
Expand Down

0 comments on commit 6fcfea8

Please sign in to comment.