(List (= scope= flags=2 words=[] bindings=[('reset', {[ComSub (Com {[LIT_CHARS tput]} {[LIT_CHARS sgr0]})]})]) (= scope= flags=2 words=[] bindings=[('bold', {[ComSub (Com {[LIT_CHARS tput]} {[LIT_CHARS bold]})]})]) (= scope= flags=2 words=[] bindings=[('black', {[ComSub (Com {[LIT_CHARS tput]} {[LIT_CHARS setaf]} {[LIT_CHARS 0]})]})]) (= scope= flags=2 words=[] bindings=[('red', {[ComSub (Com {[LIT_CHARS tput]} {[LIT_CHARS setaf]} {[LIT_CHARS 1]})]})]) (= scope= flags=2 words=[] bindings=[('green', {[ComSub (Com {[LIT_CHARS tput]} {[LIT_CHARS setaf]} {[LIT_CHARS 2]})]})]) (FunctionDef kube::test::clear_all [] (Com {[LIT_CHARS kubectl]} {[LIT_CHARS delete]} {[DQ [VarSub kube_flags bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[LIT_CHARS rc] [LIT_COMMA ","] [LIT_CHARS pods]} {[LIT_CHARS --all]} {[LIT_CHARS --grace-period] [LIT_DBRACKET_LIKE "="] [LIT_CHARS 0]} ) ) (FunctionDef kube::test::get_object_assert [] (List (= scope= flags=0 words=[] bindings=[('object', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('request', {[VarSub 2]})]) (= scope= flags=0 words=[] bindings=[('expected', {[VarSub 3]})]) (= scope= flags=0 words=[] bindings=[('args', {[VarSub 4 test_op=VS_TEST_COLON_HYPHEN {}]})]) (= scope= flags=0 words=[] bindings=[('res', {[ComSub (Com {[LIT_CHARS eval]} {[LIT_CHARS kubectl]} {[VarSub args]} {[LIT_CHARS get]} {[DQ [VarSub kube_flags bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[VarSub object]} {[LIT_CHARS -o]} {[LIT_CHARS go-template] [LIT_DBRACKET_LIKE "="] [\ LIT_ESCAPED_CHAR "\\\""] [VarSub request] [\ LIT_ESCAPED_CHAR "\\\""]})]})]) (If (DBracket {B2 BINARY_STRING_TILDE_EQUAL {[DQ [VarSub res]]} {[LIT_OTHER "^"] [VarSub expected] [LIT_OTHER "$"]}}) (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub green]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Successful get "][VarSub object][LIT_CHARS " "][VarSub request][LIT_CHARS ": "][VarSub res]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[VarSub bold] [VarSub red]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "FAIL!"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Get "][VarSub object][LIT_CHARS " "][VarSub request]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Expected: "][VarSub expected]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Got: "][VarSub res]]} ) (Com {[LIT_CHARS echo]} {[VarSub reset] [VarSub red]} ) (Com {[LIT_CHARS caller]} ) (Com {[LIT_CHARS echo]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef kube::test::get_object_jsonpath_assert [] (List (= scope= flags=0 words=[] bindings=[('object', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('request', {[VarSub 2]})]) (= scope= flags=0 words=[] bindings=[('expected', {[VarSub 3]})]) (= scope= flags=0 words=[] bindings=[('res', {[ComSub (Com {[LIT_CHARS eval]} {[LIT_CHARS kubectl]} {[LIT_CHARS get]} {[DQ [VarSub kube_flags bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[VarSub object]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "jsonpath="] [\ LIT_ESCAPED_CHAR "\\\""] [VarSub request] [\ LIT_ESCAPED_CHAR "\\\""] =})]})]) (If (DBracket {B2 BINARY_STRING_TILDE_EQUAL {[DQ [VarSub res]]} {[LIT_OTHER "^"] [VarSub expected] [LIT_OTHER "$"]}}) (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub green]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Successful get "][VarSub object][LIT_CHARS " "][VarSub request][LIT_CHARS ": "][VarSub res]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[VarSub bold] [VarSub red]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "FAIL!"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Get "][VarSub object][LIT_CHARS " "][VarSub request]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Expected: "][VarSub expected]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Got: "][VarSub res]]} ) (Com {[LIT_CHARS echo]} {[VarSub reset] [VarSub red]} ) (Com {[LIT_CHARS caller]} ) (Com {[LIT_CHARS echo]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef kube::test::describe_object_assert [] (List (= scope= flags=0 words=[] bindings=[('resource', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('object', {[VarSub 2]})]) (= scope= flags=0 words=[] bindings=[('matches', {[VarSub @ transform_ops=[Slice {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 3]}} None]]})]) (= scope= flags=0 words=[] bindings=[('result', {[ComSub (Com {[LIT_CHARS eval]} {[LIT_CHARS kubectl]} {[LIT_CHARS describe]} {[DQ [VarSub kube_flags bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[VarSub resource]} {[VarSub object]})]})]) (For match [{[VarSub matches]}]) (If (DBracket {B! {B1 UNARY_STRING_n {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]}) (Com {[LIT_CHARS grep]} {[VarSub match]}) )]}}}) (List (Com {[LIT_CHARS echo]} {[VarSub bold] [VarSub red]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "FAIL!"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Describe "][VarSub resource][LIT_CHARS " "][VarSub object]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Expected Match: "][VarSub match]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Not found in:"]]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]} ) (Com {[LIT_CHARS echo]} {[VarSub reset] [VarSub red]} ) (Com {[LIT_CHARS caller]} ) (Com {[LIT_CHARS echo]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub green]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Successful describe "][VarSub resource][LIT_CHARS " "][VarSub object][LIT_CHARS ":"]]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]} ) ) ) (FunctionDef kube::test::describe_object_events_assert [] (List (= scope= flags=0 words=[] bindings=[('resource', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('object', {[VarSub 2]})]) (= scope= flags=0 words=[] bindings=[('showevents', {[VarSub 3 test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS true]]}]})]) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub 3 test_op=VS_TEST_COLON_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('result', {[ComSub (Com {[LIT_CHARS eval]} {[LIT_CHARS kubectl]} {[LIT_CHARS describe]} {[DQ [VarSub kube_flags bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[VarSub resource]} {[VarSub object]})]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('result', {[ComSub (Com {[LIT_CHARS eval]} {[LIT_CHARS kubectl]} {[LIT_CHARS describe]} {[DQ [VarSub kube_flags bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[DQ [LIT_CHARS "--show-events="][VarSub showevents]]} {[VarSub resource]} {[VarSub object]})]})]) ) (If (DBracket {B1 UNARY_STRING_n {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]}) (Com {[LIT_CHARS grep]} {[DQ [LIT_CHARS "No events."][\ LIT_ESCAPED_CHAR "\\|"][LIT_CHARS "Events:"]]}) )]}}) (= scope= flags=0 words=[] bindings=[('has_events', {[DQ [LIT_CHARS true]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('has_events', {[DQ [LIT_CHARS false]]})]) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[VarSub showevents]} {[VarSub has_events]}}) (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub green]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Successful describe"]]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]} ) (Com {[LIT_CHARS echo]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[VarSub bold] [VarSub red]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS FAIL]]} ) (If (DBracket {B2 BINARY_STRING_EQUAL {[VarSub showevents]} {[DQ [LIT_CHARS false]]}}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Events information should not be described in:"]]} ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Events information not found in:"]]} ) ) (Com {[LIT_CHARS echo]} {[VarSub result]} ) (Com {[LIT_CHARS echo]} {[VarSub reset] [VarSub red]} ) (Com {[LIT_CHARS caller]} ) (Com {[LIT_CHARS echo]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef kube::test::describe_resource_assert [] (List (= scope= flags=0 words=[] bindings=[('resource', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('matches', {[VarSub @ transform_ops=[Slice {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 2]}} None]]})]) (= scope= flags=0 words=[] bindings=[('result', {[ComSub (Com {[LIT_CHARS eval]} {[LIT_CHARS kubectl]} {[LIT_CHARS describe]} {[DQ [VarSub kube_flags bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[VarSub resource]})]})]) (For match [{[VarSub matches]}]) (If (DBracket {B! {B1 UNARY_STRING_n {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]}) (Com {[LIT_CHARS grep]} {[VarSub match]}) )]}}}) (List (Com {[LIT_CHARS echo]} {[VarSub bold] [VarSub red]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "FAIL!"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Describe "][VarSub resource]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Expected Match: "][VarSub match]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Not found in:"]]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]} ) (Com {[LIT_CHARS echo]} {[VarSub reset] [VarSub red]} ) (Com {[LIT_CHARS caller]} ) (Com {[LIT_CHARS echo]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub green]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Successful describe "][VarSub resource][LIT_CHARS ":"]]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]} ) ) ) (FunctionDef kube::test::describe_resource_events_assert [] (List (= scope= flags=0 words=[] bindings=[('resource', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('showevents', {[VarSub 2 test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS true]]}]})]) (= scope= flags=0 words=[] bindings=[('result', {[ComSub (Com {[LIT_CHARS eval]} {[LIT_CHARS kubectl]} {[LIT_CHARS describe]} {[DQ [VarSub kube_flags bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]} {[DQ [LIT_CHARS "--show-events="][VarSub showevents]]} {[VarSub resource]})]})]) (If (DBracket {B1 UNARY_STRING_n {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]}) (Com {[LIT_CHARS grep]} {[DQ [LIT_CHARS "No events."][\ LIT_ESCAPED_CHAR "\\|"][LIT_CHARS "Events:"]]}) )]}}) (= scope= flags=0 words=[] bindings=[('has_events', {[DQ [LIT_CHARS true]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('has_events', {[DQ [LIT_CHARS false]]})]) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[VarSub showevents]} {[VarSub has_events]}}) (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub green]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Successful describe"]]} ) (Com {[LIT_CHARS echo]} {[DQ [VarSub result]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[VarSub bold] [VarSub red]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS FAIL]]} ) (If (DBracket {B2 BINARY_STRING_EQUAL {[VarSub showevents]} {[DQ [LIT_CHARS false]]}}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Events information should not be described in:"]]} ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " Events information not found in:"]]} ) ) (Com {[LIT_CHARS echo]} {[VarSub result]} ) (Com {[LIT_CHARS caller]} ) (Com {[LIT_CHARS echo]} {[VarSub reset]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef kube::test::if_has_string [] (List (= scope= flags=0 words=[] bindings=[('message', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('match', {[VarSub 2]})]) (If (DBracket {B1 UNARY_STRING_n {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub message]]}) (Com {[LIT_CHARS grep]} {[DQ [VarSub match]]}) )]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS Successful]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "message:"][VarSub message]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "has:"][VarSub match]]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "FAIL!"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "message:"][VarSub message]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "has not:"][VarSub match]]} ) (Com {[LIT_CHARS caller]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) ) ) )