@@ -130,7 +130,7 @@ pub struct TestContext {
130
130
131
131
pub async fn run ( ctx : TestContext , exec_string : String ) -> Result < ( ) , anyhow:: Error > {
132
132
let test_items: Vec < TestItem > = serde_yaml:: from_str ( & exec_string) ?;
133
- log:: debug!( target: "testkit" , "test_plans : {:#?}" , test_items) ;
133
+ log:: debug!( target: "testkit" , "test_items : {:#?}" , test_items) ;
134
134
135
135
let result = base_request ( ctx. clone ( ) , & test_items) . await ;
136
136
match result {
@@ -700,18 +700,18 @@ mod tests {
700
700
r#"
701
701
---
702
702
- name: stage1
703
- - POST: {}
703
+ POST: {}
704
704
headers:
705
705
Content-Type: application/json
706
706
json:
707
707
task: hit the gym
708
708
asserts:
709
709
ok: $.resp.json.task == "hit the gym"
710
- ok: $.resp.status == $.env.STATUS
710
+ ok: $.resp.status == 201
711
711
number: $.resp.json.id
712
712
string: $.resp.json.task
713
713
boolean: $.resp.json.completed
714
- outputs :
714
+ exports :
715
715
todoResp: $.resp.json.resp_string
716
716
- GET: {}
717
717
json:
@@ -724,7 +724,7 @@ mod tests {
724
724
empty: $.resp.json.empty_str
725
725
empty: $.resp.json.empty_arr
726
726
null: $.resp.json.null_val
727
- outputs :
727
+ exports :
728
728
todoId: $.resp.json.tasks[0].id
729
729
- PUT: {}
730
730
asserts:
@@ -745,14 +745,14 @@ mod tests {
745
745
let ctx = TestContext {
746
746
plan : Some ( "plan" . into ( ) ) ,
747
747
file_source : "file source" . into ( ) ,
748
- file : "file.tp.yml " . into ( ) ,
748
+ file : "file.tk.yaml " . into ( ) ,
749
749
path : "." . into ( ) ,
750
750
stage : Some ( "stage_name" . into ( ) ) ,
751
751
stage_index : 0 ,
752
752
} ;
753
753
let resp = run ( ctx, yaml_str. into ( ) ) . await ;
754
754
log:: debug!( "{:?}" , resp) ;
755
- // assert_ok !(resp);
755
+ assert ! ( resp. is_ok ( ) ) ;
756
756
m3. assert_hits ( 1 ) ;
757
757
m2. assert_hits ( 1 ) ;
758
758
m4. assert_hits ( 1 ) ;
0 commit comments