Files
.github
alerting
client
config
controller
core
docs
examples
jsonpath
k8s
k8stest
metric
pattern
security
handler.go
handler_test.go
security.go
security_test.go
sha512.go
sha512_test.go
storage
util
vendor
watchdog
web
.dockerignore
.gitattributes
.gitignore
Dockerfile
LICENSE.md
Makefile
README.md
config.yaml
go.mod
go.sum
main.go
gatus/security/sha512_test.go
2020-10-14 19:24:00 -04:00

13 lines
365 B
Go

package security
import "testing"
func TestSha512(t *testing.T) {
input := "password"
expectedHash := "b109f3bbbc244eb82441917ed06d618b9008dd09b3befd1b5e07394c706a8bb980b1d7785e5976ec049b46df5f1326af5a2ea6d103fd07c95385ffab0cacbc86"
hash := Sha512(input)
if hash != expectedHash {
t.Errorf("Expected hash to be '%s', but was '%s'", expectedHash, hash)
}
}