Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement rivertest.RequireNotInserted test helper (inverse of RequireInserted) #237

Merged
merged 1 commit into from
May 4, 2024

Commits on May 4, 2024

  1. Implement rivertest.RequireNotInserted test helper (inverse of `Req…

    …uireInserted`)
    
    Here, introduce a new test helper for `rivertest.RequireNotInserted`,
    which fails in cases where a job matching in the input kind and
    (optional) properties _was_ inserted rather than was not. Its purpose is
    to invert the checks made by the existing `RequireInserted`.
    
    Unlike `RequireInserted`, I _didn't_ implement a batch version of the
    helper like `RequireNotInsertedMany`. I was going to do it, but after
    thinking about it for a while, I don't think it really makes sense.
    `RequireInsertedMany` is useful because it allows you to verify a
    sequence of job inserts that occurred in a particular order with
    particular options. There's no sequence for jobs that weren't inserted,
    so the only thing a `RequireNotInsertedMany` would do is verify that
    many different job kinds were all not inserted as part of one operation,
    which doesn't really seem that useful. I figure if there's demand we can
    think about adding a batch helper, but it may be better to not do so
    prospectively to keep the API smaller, and avoiding adding a function
    that doesn't end up getting any use.
    brandur committed May 4, 2024
    Configuration menu
    Copy the full SHA
    88ae276 View commit details
    Browse the repository at this point in the history