coreos / fedora-coreos-cincinnati

Backend for Fedora CoreOS auto-updates (Cincinnati server)
Other
12 stars 16 forks source link

Make JSON endpoints configurable #8

Open jlebon opened 4 years ago

jlebon commented 4 years ago

I'd like to be able to write upgrade tests that require talking to a local dumnati server serving test-specific metadata. Right now, the releases.json and ${stream}.json is hardcoded into the app. Can we make these be configurable somehow? I see it doesn't use config files yet, and maybe we don't want to go all the way there until we sort out the merger with Cincinnati -- maybe just env vars for now would work?

jlebon commented 4 years ago

I'd like to be able to write upgrade tests that require talking to a local dumnati server serving test-specific metadata.

Hmm, actually... I guess I could hack this up without using dumnati at all by just serving the JSON at the URL zincati will hit. A bit underhanded, and implies it's not entirely testing zincati itself, though it simplifies the setup quite a bit.

lucab commented 4 years ago

I've left a TODO to figure out the configuration story: https://github.com/coreos/fedora-coreos-cincinnati/blob/b69bc52471b5d2819427e2ba081bf1ec8746fb69/dumnati/src/main.rs#L82