Use example.com hosts in config test fixtures (closes #371)
check / check (push) Failing after 18m8s
check / check (push) Failing after 18m8s
The allowlist fixtures named one of our storage hosts and the owner's domain. They now use s3.example.com and images.example.org; the tests check the same behaviour. Model: opus-5-5
This commit is contained in:
1 parent
cf6f8172e3
commit
9bcef9d06e
2 files changed
+8
-8
No files matched your search
@@ -52,7 +52,7 @@ const validTestSigningKey = "0123456789abcdef0123456789abcdef"
|
||||
const signingKeyLine = "signing_key: " + validTestSigningKey + "\n"
|
||||
|
||||
// testHostS3 is an allowlist host entry used across the config tests.
|
||||
const testHostS3 = "s3.sneak.cloud"
|
||||
const testHostS3 = "s3.example.com"
|
||||
|
||||
// nullValueText is the substring that error messages about explicitly
|
||||
// null config values must contain.
|
||||
@@ -272,7 +272,7 @@ state_dir: /tmp/pixa-test-state
|
||||
db_url: "file:/tmp/pixa-test-state/other.sqlite3"
|
||||
signing_key: ` + validTestSigningKey + `
|
||||
allowlist_hosts:
|
||||
- s3.sneak.cloud
|
||||
- s3.example.com
|
||||
- .example.com
|
||||
allow_http: true
|
||||
upstream_connections_per_host: 5
|
||||
@@ -306,7 +306,7 @@ metrics:
|
||||
|
||||
if len(c.AllowlistHosts) != 2 || c.AllowlistHosts[0] != testHostS3 ||
|
||||
c.AllowlistHosts[1] != ".example.com" {
|
||||
t.Errorf("AllowlistHosts = %v, want [s3.sneak.cloud .example.com]",
|
||||
t.Errorf("AllowlistHosts = %v, want [s3.example.com .example.com]",
|
||||
c.AllowlistHosts)
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ func TestCommaSeparatedAllowlistStillSupported(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
yamlContent := signingKeyLine +
|
||||
`allowlist_hosts: "s3.sneak.cloud, sneak.berlin"
|
||||
`allowlist_hosts: "s3.example.com, images.example.org"
|
||||
`
|
||||
|
||||
c, err := configFromYAML(t, yamlContent)
|
||||
@@ -337,8 +337,8 @@ func TestCommaSeparatedAllowlistStillSupported(t *testing.T) {
|
||||
}
|
||||
|
||||
if len(c.AllowlistHosts) != 2 || c.AllowlistHosts[0] != testHostS3 ||
|
||||
c.AllowlistHosts[1] != "sneak.berlin" {
|
||||
t.Errorf("AllowlistHosts = %v, want [s3.sneak.cloud sneak.berlin]",
|
||||
c.AllowlistHosts[1] != "images.example.org" {
|
||||
t.Errorf("AllowlistHosts = %v, want [s3.example.com images.example.org]",
|
||||
c.AllowlistHosts)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user