ok, I doubt it's `pactffi` issue now with matchers...
# libpact_ffi-users
m
ok, I doubt it's
pactffi
issue now with matchers, but... Pact setup:
Copy code
RefCell { 
  value: PactHandleInner { 
    pact: V4Pact { 
      consumer: Consumer { name: "Consumer" }, 
      provider: Provider { name: "Provider" }, 
      interactions: [
        SynchronousHttp { 
          id: None, 
          key: None, 
          description: "an interaction with query item matcher 'includes'", 
          provider_states: [], 
          request: HttpRequest { 
            method: "GET", 
            path: "/interaction", 
            query: Some({"item": [Some("sub")]}), 
            headers: None, 
            body: Missing, 
            matching_rules: MatchingRules { 
              rules: {
                PATH: MatchingRuleCategory { name: PATH, rules: {} }, 
                QUERY: MatchingRuleCategory { name: QUERY, rules: {
                  DocPath { 
                    path_tokens: [Root, Field("item")], 
                    expr: "$.item" 
                  }: 
                  RuleList { 
                    rules: [Include("sub")], 
                    rule_logic: And, 
                    cascaded: false 
                  }
                } 
              }
            } 
          }, 
          generators: Generators { categories: {} } }, 
          response: HttpResponse { 
            status: 200, 
            headers: None, 
            body: Missing, 
            matching_rules: MatchingRules { rules: {} }, 
            generators: Generators { categories: {} } }, 
            comments: {}, 
            pending: false, 
            plugin_config: {}, 
            interaction_markup: InteractionMarkup { markup: "", markup_type: "" }, 
            transport: None 
          }
        ], 
      metadata: {
        "namespace1": Object {"name1": String("value1")}, 
        "namespace2": Object {"name2": String("value2")}, 
        "pactRust": Object {"ffi": String("0.4.25")}
      }, 
      plugin_data: [] 
    }, 
    mock_server_started: true, 
    specification_version: V4 
  } 
}
Simple GET request
Copy code
----------------------------------------------------------------------------------------
       method: GET
       path: /interaction
       query: Some({"item": [Some("substring")]})
       headers: Some({"accept-language": ["en-AU", "en;q=0.9"], "user-agent": ["xctest/23600 CFNetwork/1568.300.101 Darwin/24.2.0"], "host": ["127.0.0.1:4658"], "accept-encoding": ["gzip", "deflate"], "connection": ["keep-alive"], "accept": ["*/*"]})
       body: Empty
      ----------------------------------------------------------------------------------------
Failing to verify
Copy code
QueryMismatch: Unable to match ["sub"] using Include("sub")
  Expected: ["sub"]
  Actual: ["substring"]
  Parameter: $.item])"
r
Gah! Another one.
m
I hope not
r
Tells how well used these are
m
😅
should I just redirect myself to github issues?
r
Yeah
Or you can go back to what you have been doing for the last year and we can pretend we never saw these.
m
yup, I like that, that sounds good
I mean, I don't need this working so... why am I making it our problem, right?
I was never here