Name no node in route-adapter's, rofi's, claude-licence-manager's and nextcloud-client's fixtures (issue 1838)
This commit is contained in:
@@ -43,7 +43,7 @@ type SecretAnswer struct {
|
||||
var aName = regexp.MustCompile(`^[a-z0-9][a-z0-9-]{0,62}$`)
|
||||
|
||||
// aCaller is who asked, as the controller names the bus's caller (novox/hq ADR 0277): a principal such as
|
||||
// `g14/claude-code`, or an account at a shell, in a name's characters and spaces, at most 80. Nothing else — no line
|
||||
// `node-b/claude-code`, or an account at a shell, in a name's characters and spaces, at most 80. Nothing else — no line
|
||||
// break, no markup, no punctuation a sentence is written with — so the prompt's words stay this holder's.
|
||||
var aCaller = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._/@ -]{0,79}$`)
|
||||
|
||||
|
||||
@@ -113,11 +113,11 @@ func TestThePromptIsWrittenHereFromNamesAndSaysTheControllerAsks(t *testing.T) {
|
||||
t.Errorf("prompt %q, message %q", q.Prompt, q.Message)
|
||||
}
|
||||
// Asked by the vault's own account, as the runtime proved it (issue 723): the prompt says the vault asks.
|
||||
if q, err := secretQuestion("novox.mesh-vault", base); err != nil ||
|
||||
if q, err := secretQuestion("node-c.mesh-vault", base); err != nil ||
|
||||
!strings.HasPrefix(q.Message, "The mesh's vault asks for telegram-token") {
|
||||
t.Errorf("asked by the vault: %q %v", q.Message, err)
|
||||
}
|
||||
if q, _ := secretQuestion("novox.mesh-vault-not", base); !strings.HasPrefix(q.Message, "The mesh's controller") {
|
||||
if q, _ := secretQuestion("node-c.mesh-vault-not", base); !strings.HasPrefix(q.Message, "The mesh's controller") {
|
||||
t.Errorf("a caller that is not the vault's account is said to be the vault: %q", q.Message)
|
||||
}
|
||||
// And who asked the controller, when it says so (novox/hq ADR 0277): a caller's name, in a name's characters.
|
||||
@@ -125,13 +125,13 @@ func TestThePromptIsWrittenHereFromNamesAndSaysTheControllerAsks(t *testing.T) {
|
||||
for k, v := range base {
|
||||
withAsker[k] = v
|
||||
}
|
||||
withAsker["asked_by"] = "g14/claude-code"
|
||||
withAsker["asked_by"] = "node-b/claude-code"
|
||||
q, err = secretQuestion("unproven", withAsker)
|
||||
if err != nil || !strings.Contains(q.Message, "It was asked for by g14/claude-code.") {
|
||||
if err != nil || !strings.Contains(q.Message, "It was asked for by node-b/claude-code.") {
|
||||
t.Errorf("asked_by: %q %v", q.Message, err)
|
||||
}
|
||||
withAsker["asked_by"] = "jochen at a shell on novox"
|
||||
if q, err = secretQuestion("unproven", withAsker); err != nil || !strings.Contains(q.Message, "It was asked for by jochen at a shell on novox.") {
|
||||
withAsker["asked_by"] = "operator at a shell on node-c"
|
||||
if q, err = secretQuestion("unproven", withAsker); err != nil || !strings.Contains(q.Message, "It was asked for by operator at a shell on node-c.") {
|
||||
t.Errorf("asked_by at a shell: %q %v", q.Message, err)
|
||||
}
|
||||
for key, value := range map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user