go(localbreach): add test+testdata
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2023-08-07 22:10:48 +02:00
parent cd2a7ed6de
commit c3a565adf5
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,21 @@
// Copyright 2023 wanderer <a_mirre at utb dot cz>
// SPDX-License-Identifier: AGPL-3.0-only
package localbreach
import (
"path"
"testing"
)
func TestLocalbreach(t *testing.T) {
testDir := "./testdata"
t1 := "test1.yaml"
schema, err := Load(path.Join(testDir, t1))
if err != nil {
t.Fatal(err)
}
t.Logf("schema: %+v", schema)
}

21
modules/localbreach/testdata/test1.yaml vendored Normal file
View File

@ -0,0 +1,21 @@
# Copyright 2023 wanderer <a_mirre at utb dot cz>
# SPDX-License-Identifier: AGPL-3.0-only
---
name: test breach 1
time: 2022-11-11
isVerified: false
containsPasswds: true
containsHashes: false
containsUsernames: false
containsEmails: true
data:
emails:
- aa@bb.cc
- jdsalk@jfhdkls.com
- dfjsnlads@gmail.com
passwds:
- password1
- qwertyasdf
- 0987654321
...