mirror of
https://github.com/hanzoai/status.git
synced 2026-10-30 18:21:48 +00:00
White-labelable status monitoring service with all Gatus branding removed. Defaults to neutral "Status" text. Branding is driven entirely by the ui section in config YAML. - Pure Go build (CGO_ENABLED=0, modernc.org/sqlite) - Multi-stage Dockerfile (node frontend + go backend + alpine runtime) - K8s kustomize overlays for hanzo and lux deployments - GitHub Actions CI for GHCR image push - Pre-built Vue frontend with zero upstream branding
24 lines
646 B
Go
24 lines
646 B
Go
package security
|
|
|
|
import "testing"
|
|
|
|
func TestBasicConfig_IsValidUsingBcrypt(t *testing.T) {
|
|
basicConfig := &BasicConfig{
|
|
Username: "admin",
|
|
PasswordBcryptHashBase64Encoded: "JDJhJDA4JDFoRnpPY1hnaFl1OC9ISlFsa21VS09wOGlPU1ZOTDlHZG1qeTFvb3dIckRBUnlHUmNIRWlT",
|
|
}
|
|
if !basicConfig.isValid() {
|
|
t.Error("basicConfig should've been valid")
|
|
}
|
|
}
|
|
|
|
func TestBasicConfig_IsValidWhenPasswordIsInvalidUsingBcrypt(t *testing.T) {
|
|
basicConfig := &BasicConfig{
|
|
Username: "admin",
|
|
PasswordBcryptHashBase64Encoded: "",
|
|
}
|
|
if basicConfig.isValid() {
|
|
t.Error("basicConfig shouldn't have been valid")
|
|
}
|
|
}
|