@@ -2398,8 +2398,16 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
23982398 clusterextension .Create (oc )
23992399 o .Expect (clusterextension .InstalledBundle ).To (o .ContainSubstring ("v0.0.1" ))
24002400 status , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o" , `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}` )
2401+ if ! strings .Contains (status , "True" ) {
2402+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2403+ e2e .Logf ("Expected status to be True, but got: %s. Full status: %s" , status , fullStatus )
2404+ }
24012405 o .Expect (status ).To (o .ContainSubstring ("True" ))
24022406 message , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o" , `jsonpath={.status.conditions[?(@.type=="Upgradeable")].message}` )
2407+ if ! strings .Contains (message , "All is well" ) {
2408+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2409+ e2e .Logf ("Expected message to contain 'All is well', but got: %s. Full status: %s" , message , fullStatus )
2410+ }
24032411 o .Expect (message ).To (o .ContainSubstring ("All is well" ))
24042412
24052413 g .By ("3) upgrade clusterextension to 1.1.0, olm.maxOpenShiftVersion is 4.19" )
@@ -2413,9 +2421,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
24132421 return false , nil
24142422 })
24152423 status , _ = olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o" , `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}` )
2424+ if ! strings .Contains (status , "False" ) {
2425+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2426+ e2e .Logf ("Expected status to be False, but got: %s. Full status: %s" , status , fullStatus )
2427+ }
24162428 o .Expect (status ).To (o .ContainSubstring ("False" ))
24172429 if errWait != nil {
2418- _ , _ = olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status.conditions}" )
2430+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2431+ e2e .Logf ("Upgradeable message is not correct. Full status: %s" , fullStatus )
24192432 }
24202433 exutil .AssertWaitPollNoErr (errWait , "Upgradeable message is not correct" )
24212434
@@ -2430,9 +2443,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
24302443 return false , nil
24312444 })
24322445 status , _ = olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o" , `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}` )
2446+ if ! strings .Contains (status , "False" ) {
2447+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2448+ e2e .Logf ("Expected status to be False, but got: %s. Full status: %s" , status , fullStatus )
2449+ }
24332450 o .Expect (status ).To (o .ContainSubstring ("False" ))
24342451 if errWait != nil {
2435- _ , _ = olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status.conditions}" )
2452+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2453+ e2e .Logf ("Upgradeable message is not correct. Full status: %s" , fullStatus )
24362454 }
24372455 exutil .AssertWaitPollNoErr (errWait , "Upgradeable message is not correct" )
24382456 })
@@ -2490,8 +2508,16 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
24902508 clusterextension .Create (oc )
24912509 o .Expect (clusterextension .InstalledBundle ).To (o .ContainSubstring ("v0.0.1" ))
24922510 status , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o" , `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}` )
2511+ if ! strings .Contains (status , "True" ) {
2512+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2513+ e2e .Logf ("Expected status to be True, but got: %s. Full status: %s" , status , fullStatus )
2514+ }
24932515 o .Expect (status ).To (o .ContainSubstring ("True" ))
24942516 message , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o" , `jsonpath={.status.conditions[?(@.type=="Upgradeable")].message}` )
2517+ if ! strings .Contains (message , "All is well" ) {
2518+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2519+ e2e .Logf ("Expected message to contain 'All is well', but got: %s. Full status: %s" , message , fullStatus )
2520+ }
24952521 o .Expect (message ).To (o .ContainSubstring ("All is well" ))
24962522
24972523 g .By ("3) upgrade clusterextension to 1.2.0, olm.maxOpenShiftVersion is 4.20" )
@@ -2505,9 +2531,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
25052531 return false , nil
25062532 })
25072533 status , _ = olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o" , `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}` )
2534+ if ! strings .Contains (status , "False" ) {
2535+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2536+ e2e .Logf ("Expected status to be False, but got: %s. Full status: %s" , status , fullStatus )
2537+ }
25082538 o .Expect (status ).To (o .ContainSubstring ("False" ))
25092539 if errWait != nil {
2510- _ , _ = olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status.conditions}" )
2540+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2541+ e2e .Logf ("Upgradeable message is not correct. Full status: %s" , fullStatus )
25112542 }
25122543 exutil .AssertWaitPollNoErr (errWait , "Upgradeable message is not correct" )
25132544
@@ -2522,9 +2553,14 @@ var _ = g.Describe("[sig-olmv1][Jira:OLM] clusterextension", g.Label("NonHyperSh
25222553 return false , nil
25232554 })
25242555 status , _ = olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o" , `jsonpath={.status.conditions[?(@.type=="Upgradeable")].status}` )
2556+ if ! strings .Contains (status , "False" ) {
2557+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2558+ e2e .Logf ("Expected status to be False, but got: %s. Full status: %s" , status , fullStatus )
2559+ }
25252560 o .Expect (status ).To (o .ContainSubstring ("False" ))
25262561 if errWait != nil {
2527- _ , _ = olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status.conditions}" )
2562+ fullStatus , _ := olmv1util .GetNoEmpty (oc , "co" , "olm" , "-o=jsonpath-as-json={.status}" )
2563+ e2e .Logf ("Upgradeable message is not correct. Full status: %s" , fullStatus )
25282564 }
25292565 exutil .AssertWaitPollNoErr (errWait , "Upgradeable message is not correct" )
25302566
0 commit comments