Skip to content

path argument to [sqlx::test] broken in 0.8.0 #3395

@praseodym

Description

@praseodym

Bug Description

The path argument to the [sqlx::test] macro seems broken in 0.8.0. cargo check reports the following error after updating from sqlx 0.7.4 to 0.8.0:

error: expected string literal
   --> src/polling_station/mod.rs:176:27
    |
176 |     #[sqlx::test(fixtures(path = "../../fixtures", scripts("elections", "polling_stations")))]
    |                           ^^^^

This code is similar to the usage documented in the [sqlx::test] docs for 0.8.0:

#[sqlx::test(fixtures(path = "./fixtures", scripts("users", "posts")))]

Info

  • SQLx version: 0.8.0
  • SQLx features enabled: ["runtime-tokio", "sqlite", "chrono"]
  • Database server and version: SQLite 3.45.0
  • Operating system: macOS 14.6
  • rustc --version: rustc 1.80.0 (051478957 2024-07-21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions