# Check that we see HTTP log messages printed when enabled.
env CUE_DEBUG=http
# Smoke test that the logging looks reasonable. The actual log messages
# are tested more fully in the httplog package itself.
exec cue mod tidy
stderr '{"time":".*","level":"INFO","msg":"http client->","info":{"id":[0-9]+,"method":"GET","url":"http://[^/]+/v2/example.com/tags/list\?n=\d+","contentLength":0,"header":{"User-Agent":\["Cue/[^ ]+ \(cmd/cue; .*\) Go/[^ ]+ \(.*\)"\]}}}'

# Check that the resulting module evaluates as expected.
exec cue export .
cmp stdout want-stdout
-- want-stdout --
{
    "example.com@v0": "v0.0.1",
    "main": "main"
}
-- cue.mod/module.cue --
module: "main.org@v0"
language: version: "v0.8.0"

-- main.cue --
package main
import "example.com@v0:main"

main
"main": "main"

-- _registry/example.com_v0.0.1/cue.mod/module.cue --
module: "example.com@v0"
language: version: "v0.8.0"

-- _registry/example.com_v0.0.1/top.cue --
package main

"example.com@v0": "v0.0.1"
