ipfs / ipfs/gateway-conformance

Should all the tests make requests to "subdomain-url"?

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
19
Forks
15
Avg merge
1d 4h
Merged PRs (30d)
5

Description

Priority: **low**

The below is copied from https://github.com/ipfs/gateway-conformance/pull/9#discussion_r1147370425

---
Wouldn't it make sense to always use what we now call subdomain-url. As in, all the test should talk to gateway-url in a way that thinks it's called subdomain-url? Theoretically, wouldn't that be more correct? So really, every test case should be executed 3 times (with host header, proxy, proxy with tunneling) as long as subdomain-url and gateway-url are different.

Looking more closely at how we execute the test cases with host header, I think we're not using the protocol part of gateway-url. Is that correct?

If so, isn't what we really need from the user these two pieces of info:

What are you calling/want to call your gateway? Please give us the full URL with a domain name. That would be https://dweb.link/ for example or http://example.com/. You could give us http://127.0.0.1:8080/ here as well BUT there's no way for you to support sudomains on that URL so you'll have to disable subdomain-gateway spec.
Where is your gateway hosted? Please give us the host we should contact when we're making requests to the URL you provided in the previous step. If you don't, we're just going to use the host from the URL. It's fine if you give us a host with IP or a host with domain. This would be 127.0.0.1 for example or 127.0.0.1:8080 or foo.bar.example.com.
That would come together to something like this - https://github.com/ipfs/gateway-conformance/compare/main...gateway-host (note that I intentionally skipped modifying test/config code; I just wanted to get the idea across).

There's absolutely no rush with replying to this. And it's completely possible that I'm missing the point a bit - still trying to wrap my head fully around this. I just want to understand what might be most straight-forward way for those running the tests to provide us all the information we need.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.