diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-28 10:54:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-28 10:54:44 +0000 |
commit | 4831d4134606699615454caa1ee75e7d37ee778b (patch) | |
tree | a2dd87490af0d3dc498f91984a9f564639cad09b | |
parent | ec47312eebf11abcf74b5bf06df19ee2fb7b8afd (diff) | |
parent | dce877c5ca190d06c9e9c069475bd17ea12e8ac9 (diff) | |
download | podman-4831d4134606699615454caa1ee75e7d37ee778b.tar.gz podman-4831d4134606699615454caa1ee75e7d37ee778b.tar.bz2 podman-4831d4134606699615454caa1ee75e7d37ee778b.zip |
Merge pull request #9838 from xordspar0/kubeVolumeErrors
Add problematic volume name to kube play error messages
-rw-r--r-- | pkg/specgen/generate/kube/volume.go | 2 | ||||
-rw-r--r-- | test/e2e/play_kube_test.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/pkg/specgen/generate/kube/volume.go b/pkg/specgen/generate/kube/volume.go index e4f3eb196..a8042b532 100644 --- a/pkg/specgen/generate/kube/volume.go +++ b/pkg/specgen/generate/kube/volume.go @@ -116,7 +116,7 @@ func InitializeVolumes(specVolumes []v1.Volume) (map[string]*KubeVolume, error) for _, specVolume := range specVolumes { volume, err := VolumeFromSource(specVolume.VolumeSource) if err != nil { - return nil, err + return nil, errors.Wrapf(err, "failed to create volume %q", specVolume.Name) } volumes[specVolume.Name] = volume diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index cc4450379..a4c738f17 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -1449,6 +1449,7 @@ spec: kube := podmanTest.Podman([]string{"play", "kube", kubeYaml}) kube.WaitWithDefaultTimeout() Expect(kube.ExitCode()).NotTo(Equal(0)) + Expect(kube.ErrorToString()).To(ContainSubstring(defaultVolName)) }) It("podman play kube test with empty HostPath type volume", func() { |