Skip to content

Commit

Permalink
✅ fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zcubbs committed Aug 20, 2023
1 parent f951e60 commit 44833ca
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .taskfiles/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tasks:
desc: Run tests
deps: [ create-dummy-dist ]
cmds:
- go test -v -cover ./...
- go test -cover ./...

scan:
desc: Run security scanner
Expand Down
4 changes: 2 additions & 2 deletions task/check_tls.go → internal/task/check_tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"context"
"github.com/charmbracelet/log"
"github.com/jackc/pgx/v5/pgtype"
"github.com/zcubbs/tlz/api"
"github.com/zcubbs/tlz/_archives/api"
db "github.com/zcubbs/tlz/db/sqlc"
"github.com/zcubbs/tlz/pkg/tls"
"text/template"
Expand All @@ -26,7 +26,7 @@ func (t *Task) CheckCertificateValidity(ctx context.Context) {
if err != nil {
log.Warn("Cannot check certificate", "domain", domain.Name, "error", err)
domain.CertificateExpiry.Valid = false
domain.Status.String = (string)(api.StatusUnknown)
domain.Status.String = (string)(StatusUnknown)
domain.Status.Valid = true
if _, err := t.store.UpdateDomain(ctx, db.UpdateDomainParams{
Status: domain.Status,
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions internal/task/status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package task

type Status string

const (
StatusPending Status = "pending"
StatusValid Status = "valid"
StatusUnknown Status = "unknown"
StatusExpired Status = "expired"
StatusExpiring Status = "expiring"
)
File renamed without changes.

0 comments on commit 44833ca

Please sign in to comment.