oxidecomputer / dropshot

expose REST APIs from a Rust program
Apache License 2.0
843 stars 74 forks source link

[7/n] [dropshot_endpoint] add tests for custom and unnamed params #1029

Closed sunshowers closed 3 months ago

sunshowers commented 4 months ago

Noticed that channels weren't using "_dropshot_crate" sometimes, so address that.

As part of the test, introduce a syn visitor that bans particular identifiers. We're going to use this for trait-based servers as well.

sunshowers commented 4 months ago

Would it make sense to have a test that fails the assert_banned_idents check? (apologies if I missed it)

Good idea -- no I haven't added this yet.

sunshowers commented 4 months ago

Good idea -- no I haven't added this yet.

Done.

sunshowers commented 3 months ago

Also added a test for unnamed params here, since we're going to fix this in an upcoming PR.

sunshowers commented 3 months ago

Accidentally broke main 😅 fixing it in this commit because it's pretty trivial.