mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
expose e2e methods for downstream use
This commit is contained in:
parent
5c08d276a0
commit
2952af0d59
@ -29,7 +29,7 @@ type command struct {
|
|||||||
component string
|
component string
|
||||||
}
|
}
|
||||||
|
|
||||||
func coreDump(dir string) {
|
func CoreDump(dir string) {
|
||||||
c, err := loadClient()
|
c, err := loadClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error creating client: %v", err)
|
fmt.Printf("Error creating client: %v", err)
|
||||||
|
@ -91,7 +91,7 @@ func TestE2E(t *testing.T) {
|
|||||||
if err := os.MkdirAll(*reportDir, 0755); err != nil {
|
if err := os.MkdirAll(*reportDir, 0755); err != nil {
|
||||||
glog.Errorf("Failed creating report directory: %v", err)
|
glog.Errorf("Failed creating report directory: %v", err)
|
||||||
}
|
}
|
||||||
defer coreDump(*reportDir)
|
defer CoreDump(*reportDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
if testContext.Provider == "" {
|
if testContext.Provider == "" {
|
||||||
|
@ -125,6 +125,10 @@ type TestContextType struct {
|
|||||||
|
|
||||||
var testContext TestContextType
|
var testContext TestContextType
|
||||||
|
|
||||||
|
func SetTestContext(t TestContextType) {
|
||||||
|
testContext = t
|
||||||
|
}
|
||||||
|
|
||||||
type ContainerFailures struct {
|
type ContainerFailures struct {
|
||||||
status *api.ContainerStateTerminated
|
status *api.ContainerStateTerminated
|
||||||
restarts int
|
restarts int
|
||||||
|
Loading…
Reference in New Issue
Block a user