summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2017-11-03 14:37:22 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-11-17 02:07:18 +0000
commitd2eda1a8648b7e6053627e48bf500f9671f0a6c2 (patch)
tree0b86ea7165ab02003b9e6fc480432774a72724a6 /libpod
parentbf8b9a37df2aeead009996875f58c59625110472 (diff)
downloadpodman-d2eda1a8648b7e6053627e48bf500f9671f0a6c2.tar.gz
podman-d2eda1a8648b7e6053627e48bf500f9671f0a6c2.tar.bz2
podman-d2eda1a8648b7e6053627e48bf500f9671f0a6c2.zip
Enhancements to papr tests
The PR contains several enhancements to our CI testing. - enable lint testing on Fedora - add Centos Atomic as test platform - integration tests on run on the OS natively (uncontainerized) - builds are done in containers - inclusion of Vagrant file for local testing Signed-off-by: baude <bbaude@redhat.com> Closes: #18 Approved by: mheon
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container.go11
-rw-r--r--libpod/diff.go2
-rw-r--r--libpod/oci.go12
-rw-r--r--libpod/runtime_ctr.go3
-rw-r--r--libpod/runtime_img.go10
5 files changed, 20 insertions, 18 deletions
diff --git a/libpod/container.go b/libpod/container.go
index d93efda97..8e84a1f3e 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -411,14 +411,17 @@ func (c *Container) Attach(noStdin bool, keys string, attached chan<- bool) erro
resize := make(chan remotecommand.TerminalSize)
defer close(resize)
err = c.attachContainerSocket(resize, noStdin, detachKeys, attached)
- if err != nil {
- return err
- }
+
+ return err
+
// TODO
// Re-enable this when mheon is done wth it
+ //if err != nil {
+ // return err
+ //}
//c.ContainerStateToDisk(c)
- return nil
+ //return err
}
// Mount mounts a container's filesystem on the host
diff --git a/libpod/diff.go b/libpod/diff.go
index cd64520a8..5dac56a44 100644
--- a/libpod/diff.go
+++ b/libpod/diff.go
@@ -44,7 +44,7 @@ func (r *Runtime) getLayerID(id string) (string, error) {
return toLayer, nil
}
-func (r *Runtime) getLayerParent(layerID string) (string, error) {
+func (r *Runtime) getLayerParent(layerID string) (string, error) { //nolint
layer, err := r.store.Layer(layerID)
if err != nil {
return "", err
diff --git a/libpod/oci.go b/libpod/oci.go
index fd2c3b283..9fa2d3788 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -256,18 +256,18 @@ func (r *OCIRuntime) createContainer(ctr *Container, cgroupParent string) error
// updateContainerStatus retrieves the current status of the container from the
// runtime
-func (r *OCIRuntime) updateContainerStatus(ctr *Container) error {
+// remove nolint when implemented
+func (r *OCIRuntime) updateContainerStatus(ctr *Container) error { //nolint
return ErrNotImplemented
}
// startContainer starts the given container
-func (r *OCIRuntime) startContainer(ctr *Container) error {
+// remove nolint when function is complete
+func (r *OCIRuntime) startContainer(ctr *Container) error { //nolint
// TODO: streams should probably *not* be our STDIN/OUT/ERR - redirect to buffers?
- if err := utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.path, "start", ctr.ID()); err != nil {
- return err
- }
+ err := utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.path, "start", ctr.ID())
// TODO record start time in container struct
- return nil
+ return err
}
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index a1351e1d7..b23c65287 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -223,6 +223,7 @@ func (r *Runtime) removeMultipleContainers(containers []storage.Container) error
}
// ContainerConfigToDisk saves a container's nonvolatile configuration to disk
-func (r *Runtime) containerConfigToDisk(ctr *Container) error {
+// remove nolint when implemented
+func (r *Runtime) containerConfigToDisk(ctr *Container) error { //nolint
return ErrNotImplemented
}
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go
index 0fa003799..eb9976d9b 100644
--- a/libpod/runtime_img.go
+++ b/libpod/runtime_img.go
@@ -118,7 +118,7 @@ type Image struct {
Name string
ID string
fqname string
- hasImageLocal bool
+ hasImageLocal bool //nolint
runtime *Runtime
Registry string
ImageName string
@@ -359,10 +359,7 @@ func (k *Image) HasLatest() (bool, error) {
return false, err
}
_, _, err = pullRef.(types.ImageSource).GetManifest()
- if err != nil {
- return false, err
- }
- return false, nil
+ return false, err
}
// Pull is a wrapper function to pull and image
@@ -1155,7 +1152,8 @@ func ParseImageNames(names []string) (tags, digests []string, err error) {
return tags, digests, nil
}
-func annotations(manifest []byte, manifestType string) map[string]string {
+// Remove nolint when used
+func annotations(manifest []byte, manifestType string) map[string]string { //nolint
annotations := make(map[string]string)
switch manifestType {
case ociv1.MediaTypeImageManifest: