Remove every reference to our own servers (closes #396)
check / check (push) Failing after 5m55s
check / check (push) Failing after 5m55s
script/publish no longer defaults DOCKER_HOST to an SSH target on one of our servers or PUBLISH_IMAGE to the registry. Both are required, and an unset one stops it with a message naming it. The README says so. The instance name in docs and tests was our server's name; it is now host1/waf in the docs and host1/blog in the tests. Model: opus-5-5
This commit is contained in:
1 parent
0a2b2d809f
commit
791cdb9b1e
13 files changed
+61
-56
No files matched your search
@@ -218,7 +218,7 @@ const (
|
||||
// instance is an SWW_WAF_INSTANCE_NAME that is a valid app name too, and
|
||||
// remoteURL an SWW_WAF_LOG_REMOTE_URL, for the tests that send the lines.
|
||||
const (
|
||||
instance = "fsn1app1/blog"
|
||||
instance = "host1/blog"
|
||||
remoteURL = "syslog+udp://192.0.2.1:514"
|
||||
)
|
||||
|
||||
@@ -847,11 +847,11 @@ func TestInstanceNameAndLoggedHeadersAsSet(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
cfg := wafFromEnvironment(t, environment{
|
||||
instanceName: "fsn1app1/blog",
|
||||
instanceName: "host1/blog",
|
||||
logRequestHeaders: " Accept , X-Custom",
|
||||
})
|
||||
|
||||
if cfg.InstanceName != "fsn1app1/blog" ||
|
||||
if cfg.InstanceName != "host1/blog" ||
|
||||
!slices.Equal(
|
||||
cfg.LogRequestHeaders,
|
||||
[]string{"accept", "x-custom"},
|
||||
@@ -1024,14 +1024,14 @@ func TestInstanceNameNotAnAppNameStopsTheStartOnlyWhileSending(
|
||||
) {
|
||||
t.Parallel()
|
||||
|
||||
const spaced = "fsn1 app1"
|
||||
const spaced = "host1 blog"
|
||||
|
||||
sending := environment{logRemoteURL: remoteURL, instanceName: spaced}
|
||||
|
||||
_, err := config.WAFFromEnvironment(sending.viper())
|
||||
|
||||
want := logRemoteAppName + `: is unset, and ` + instanceName +
|
||||
` "fsn1 app1", its default, is not 1 to 48 printable ASCII characters ` +
|
||||
` "host1 blog", its default, is not 1 to 48 printable ASCII characters ` +
|
||||
`without a space, such as blog`
|
||||
if err == nil || err.Error() != want {
|
||||
t.Errorf("error %v, want %s", err, want)
|
||||
@@ -1333,13 +1333,13 @@ func TestInstanceNameWithAControlCharacterStopsTheStartOnlyWithNtfySet(
|
||||
) {
|
||||
t.Parallel()
|
||||
|
||||
const name = "fsn1app1\r"
|
||||
const name = "host1\r"
|
||||
|
||||
_, err := config.WAFFromEnvironment(environment{
|
||||
instanceName: name, alertNtfyURL: "https://ntfy.example/sww-alerts",
|
||||
}.viper())
|
||||
|
||||
want := instanceName + `: "fsn1app1\r" holds a control character, such as the ` +
|
||||
want := instanceName + `: "host1\r" holds a control character, such as the ` +
|
||||
`carriage return of a Windows line end, and is sent to ntfy in a header ` +
|
||||
`while ` + alertNtfyURL + ` is set`
|
||||
if err == nil || err.Error() != want {
|
||||
|
||||
Reference in new issue
Block a user