diff --git a/pkg/bootstrap/isogen/command.go b/pkg/bootstrap/isogen/command.go index 6b42eb440..cf6d93d76 100644 --- a/pkg/bootstrap/isogen/command.go +++ b/pkg/bootstrap/isogen/command.go @@ -151,6 +151,6 @@ func generateBootstrapIso( return builder.RmContainer() } - log.Debugf("Debug flag is set. Container %s stopped but not deleted.", builder.GetId()) + log.Debugf("Debug flag is set. Container %s stopped but not deleted.", builder.GetID()) return nil } diff --git a/pkg/bootstrap/isogen/command_test.go b/pkg/bootstrap/isogen/command_test.go index d122ac15b..4969263c5 100644 --- a/pkg/bootstrap/isogen/command_test.go +++ b/pkg/bootstrap/isogen/command_test.go @@ -40,7 +40,7 @@ func (mc *mockContainer) RmContainer() error { return mc.rmContainer() } -func (mc *mockContainer) GetId() string { +func (mc *mockContainer) GetID() string { return mc.getID() } diff --git a/pkg/container/container.go b/pkg/container/container.go index 185d3b552..207b535e7 100644 --- a/pkg/container/container.go +++ b/pkg/container/container.go @@ -13,7 +13,7 @@ type Container interface { RunCommand([]string, io.Reader, []string, []string, bool) error RunCommandOutput([]string, io.Reader, []string, []string) (io.ReadCloser, error) RmContainer() error - GetId() string + GetID() string } // NewContainer returns instance of Container interface implemented by particular driver diff --git a/pkg/container/container_docker.go b/pkg/container/container_docker.go index 874ceecc7..89bacb15c 100644 --- a/pkg/container/container_docker.go +++ b/pkg/container/container_docker.go @@ -134,7 +134,7 @@ func (c *DockerContainer) getCmd(cmd []string) ([]string, error) { return cmd, nil } - id, err := c.getImageId(c.imageURL) + id, err := c.getImageID(c.imageURL) if err != nil { return nil, err } @@ -166,9 +166,9 @@ func (c *DockerContainer) getConfig( return cCfg, hCfg } -// getImageId return ID of container image specified by URL. Method executes +// getImageID return ID of container image specified by URL. Method executes // ImageList function supplied with "reference" filter -func (c *DockerContainer) getImageId(url string) (string, error) { +func (c *DockerContainer) getImageID(url string) (string, error) { kv := filters.KeyValuePair{ Key: "reference", Value: url, @@ -190,7 +190,7 @@ func (c *DockerContainer) getImageId(url string) (string, error) { return img[0].ID, nil } -func (c *DockerContainer) GetId() string { +func (c *DockerContainer) GetID() string { return c.id } diff --git a/pkg/container/container_docker_test.go b/pkg/container/container_docker_test.go index 1f56c62e7..5afccc36f 100644 --- a/pkg/container/container_docker_test.go +++ b/pkg/container/container_docker_test.go @@ -200,7 +200,7 @@ func TestGetImageId(t *testing.T) { } for _, tt := range tests { cnt := getDockerContainerMock(tt.mockDockerClient) - actualRes, actualErr := cnt.getImageId(tt.url) + actualRes, actualErr := cnt.getImageID(tt.url) assert.Equal(t, tt.expectedErr, actualErr) assert.Equal(t, tt.expectedResult, actualRes) @@ -242,7 +242,7 @@ func TestGetId(t *testing.T) { cnt := getDockerContainerMock(mockDockerClient{}) err := cnt.RunCommand([]string{"testCmd"}, nil, nil, []string{}, false) require.NoError(t, err) - actualID := cnt.GetId() + actualID := cnt.GetID() assert.Equal(t, "testID", actualID) }