|
|
@ -23,7 +23,7 @@ import (
|
|
|
|
"sync"
|
|
|
|
"sync"
|
|
|
|
"time"
|
|
|
|
"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/release"
|
|
|
|
"k8s.io/helm/pkg/proto/hapi/services"
|
|
|
|
"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) {
|
|
|
|
func (env *Environment) GetLogs(testManifests []string) {
|
|
|
|
for _, testManifest := range testManifests {
|
|
|
|
for _, testManifest := range testManifests {
|
|
|
|
infos, err := env.KubeClient.Build(env.Namespace, bytes.NewBufferString(testManifest))
|
|
|
|
infos, err := env.KubeClient.Build(env.Namespace, bytes.NewBufferString(testManifest))
|
|
|
@ -134,6 +135,10 @@ func (env *Environment) GetLogs(testManifests []string) {
|
|
|
|
env.streamError(err.Error())
|
|
|
|
env.streamError(err.Error())
|
|
|
|
continue
|
|
|
|
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
|
|
|
|
podName := infos[0].Object.(*v1.Pod).Name
|
|
|
|
logs, err := env.KubeClient.GetPodLogs(podName, env.Namespace)
|
|
|
|
logs, err := env.KubeClient.GetPodLogs(podName, env.Namespace)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|