mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
Enable logging in E2E if test fails
source: https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/kubectl/kubectl_utils.go kubectlLogPod function is not exposed in above code so copied it. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
b4f20e941c
commit
7d15992769
@ -62,8 +62,10 @@ func deleteRBDPlugin() {
|
||||
|
||||
var _ = Describe("RBD", func() {
|
||||
f := framework.NewDefaultFramework("rbd")
|
||||
var c clientset.Interface
|
||||
// deploy RBD CSI
|
||||
BeforeEach(func() {
|
||||
c = f.ClientSet
|
||||
updaterbdDirPath(f.ClientSet)
|
||||
createConfigMap(rbdDirPath, f.ClientSet, f)
|
||||
deployRBDPlugin()
|
||||
@ -73,6 +75,12 @@ var _ = Describe("RBD", func() {
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
if CurrentGinkgoTestDescription().Failed {
|
||||
// log provisoner
|
||||
logsCSIPods("app=csi-rbdplugin-provisioner", c)
|
||||
// log node plugin
|
||||
logsCSIPods("app=csi-rbdplugin", c)
|
||||
}
|
||||
deleteRBDPlugin()
|
||||
deleteConfigMap(rbdDirPath)
|
||||
deleteResource(rbdExamplePath + "secret.yaml")
|
||||
|
Reference in New Issue
Block a user