Unverified Commit 6529abe8 authored by Jeff Knurek's avatar Jeff Knurek Committed by Matthew Fisher

TEST: cleanup code

Signed-off-by: 's avatarJeff Knurek <j.knurek@travelaudience.com>
parent b9460838
......@@ -23,7 +23,7 @@ import (
"sync"
"time"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/helm/pkg/proto/hapi/release"
"k8s.io/helm/pkg/proto/hapi/services"
......@@ -127,6 +127,7 @@ func (env *Environment) DeleteTestPods(testManifests []string) {
}
}
// GetLogs collects the logs from the pods created in testManifests
func (env *Environment) GetLogs(testManifests []string) {
for _, testManifest := range testManifests {
infos, err := env.KubeClient.Build(env.Namespace, bytes.NewBufferString(testManifest))
......@@ -134,6 +135,10 @@ func (env *Environment) GetLogs(testManifests []string) {
env.streamError(err.Error())
continue
}
if len(infos) < 1 {
env.streamError(fmt.Sprint("Pod manifest is invalid. Unable to obtain the logs"))
continue
}
podName := infos[0].Object.(*v1.Pod).Name
logs, err := env.KubeClient.GetPodLogs(podName, env.Namespace)
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment