I eventually got it to work like this using local files:
### Inspec testing
provisioner "shell-local" {
inline_shebang = "/usr/local/bin/zsh -e"
environment_vars = ["RUBYOPT=-W0"]
inline = [
"print -- \"${build.SSHPrivateKey}\" > pkr_build_key",
"chmod 0600 pkr_build_key",
"inspec exec --sudo -i pkr_build_key -t ssh://${build.User}@${build.Host} test/inspec"
]
}
My test files are in ./test/inspec using the standard config. So, I don't know how to do it from a URL but the workaround is obviously to have a local clone somewhere. I find that useful anyway.