update
This commit is contained in:
@@ -79,9 +79,14 @@ func TestPackageAndAuditTemplatesExecute(t *testing.T) {
|
||||
SourceIP: "203.0.113.10",
|
||||
CreatedAt: time.Now(),
|
||||
}}
|
||||
if err := templates.ExecuteTemplate(io.Discard, "audit.html", data); err != nil {
|
||||
var auditOutput bytes.Buffer
|
||||
if err := templates.ExecuteTemplate(&auditOutput, "audit.html", data); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !strings.Contains(auditOutput.String(), "Failed code attempts") ||
|
||||
!strings.Contains(auditOutput.String(), "audit_event=code_exchange_failed") {
|
||||
t.Fatal("audit page does not include the failed-code-attempt shortcut")
|
||||
}
|
||||
}
|
||||
|
||||
func TestFleetTemplateExecutes(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user