@@ -27,6 +27,7 @@ var _ = g.Describe("[Feature:Builds][Slow] update failure status", func() {
27
27
fetchDockerSrc = exutil .FixturePath ("testdata" , "builds" , "statusfail-fetchsourcedocker.yaml" )
28
28
fetchS2ISrc = exutil .FixturePath ("testdata" , "builds" , "statusfail-fetchsources2i.yaml" )
29
29
badContextDirS2ISrc = exutil .FixturePath ("testdata" , "builds" , "statusfail-badcontextdirs2i.yaml" )
30
+ oomkilled = exutil .FixturePath ("testdata" , "builds" , "statusfail-oomkilled.yaml" )
30
31
builderImageFixture = exutil .FixturePath ("testdata" , "builds" , "statusfail-fetchbuilderimage.yaml" )
31
32
pushToRegistryFixture = exutil .FixturePath ("testdata" , "builds" , "statusfail-pushtoregistry.yaml" )
32
33
failedAssembleFixture = exutil .FixturePath ("testdata" , "builds" , "statusfail-failedassemble.yaml" )
@@ -130,6 +131,25 @@ var _ = g.Describe("[Feature:Builds][Slow] update failure status", func() {
130
131
})
131
132
})
132
133
134
+ g .Describe ("Build status OutOfMemoryKilled" , func () {
135
+ g .It ("should contain OutOfMemoryKilled failure reason and message" , func () {
136
+ err := oc .Run ("create" ).Args ("-f" , oomkilled ).Execute ()
137
+ o .Expect (err ).NotTo (o .HaveOccurred ())
138
+
139
+ br , err := exutil .StartBuildAndWait (oc , "statusfail-oomkilled" , "--build-loglevel=5" )
140
+ o .Expect (err ).NotTo (o .HaveOccurred ())
141
+ br .AssertFailure ()
142
+ br .DumpLogs ()
143
+
144
+ build , err := oc .BuildClient ().Build ().Builds (oc .Namespace ()).Get (br .Build .Name , metav1.GetOptions {})
145
+ o .Expect (err ).NotTo (o .HaveOccurred ())
146
+ o .Expect (build .Status .Reason ).To (o .Equal (buildapi .StatusReasonOutOfMemoryKilled ))
147
+ o .Expect (build .Status .Message ).To (o .Equal (buildapi .StatusMessageOutOfMemoryKilled ))
148
+
149
+ exutil .CheckForBuildEvent (oc .KubeClient ().Core (), br .Build , buildapi .BuildFailedEventReason , buildapi .BuildFailedEventMessage )
150
+ })
151
+ })
152
+
133
153
g .Describe ("Build status S2I bad context dir failure" , func () {
134
154
g .It ("should contain the S2I bad context dir failure reason and message" , func () {
135
155
err := oc .Run ("create" ).Args ("-f" , badContextDirS2ISrc ).Execute ()
0 commit comments