mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +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
@ -60,8 +60,10 @@ func deleteCephfsPlugin() {
|
||||
|
||||
var _ = Describe("cephfs", func() {
|
||||
f := framework.NewDefaultFramework("cephfs")
|
||||
var c clientset.Interface
|
||||
// deploy cephfs CSI
|
||||
BeforeEach(func() {
|
||||
c = f.ClientSet
|
||||
updateCephfsDirPath(f.ClientSet)
|
||||
createConfigMap(cephfsDirPath, f.ClientSet, f)
|
||||
deployCephfsPlugin()
|
||||
@ -69,6 +71,12 @@ var _ = Describe("cephfs", func() {
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
if CurrentGinkgoTestDescription().Failed {
|
||||
// log provisoner
|
||||
logsCSIPods("app=csi-cephfsplugin-provisioner", c)
|
||||
// log node plugin
|
||||
logsCSIPods("app=csi-cephfsplugin", c)
|
||||
}
|
||||
deleteCephfsPlugin()
|
||||
deleteConfigMap(cephfsDirPath)
|
||||
deleteResource(cephfsExamplePath + "secret.yaml")
|
||||
|
Reference in New Issue
Block a user