Skip to content

Commit

Permalink
fix some tests not running (#1378)
Browse files Browse the repository at this point in the history
* fix some tests not running

* fix existing user check

#1377
  • Loading branch information
BeryJu authored Dec 20, 2024
1 parent 62aaa3e commit 258819c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ test: internal/resources/macoui internal/resources/blocky internal/resources/tft
-covermode=atomic \
-count=${TEST_COUNT} \
${TEST_FLAGS} \
$(shell go list ./... | grep -v ./api) \
$(shell go list ./... | grep -v beryju.io/gravity/api) \
2>&1 | tee test-output
go tool cover -html coverage.txt -o coverage.html

Expand Down
2 changes: 1 addition & 1 deletion pkg/roles/api/auth/api_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (ap *AuthProvider) APIUsersPut() usecase.Interactor {
).String(),
)
var oldUser *User
if err == nil && len(rawUsers.Kvs) < 1 {
if err == nil && len(rawUsers.Kvs) > 0 {
user, err := ap.userFromKV(rawUsers.Kvs[0])
if err != nil {
_ = bcrypt.CompareHashAndPassword([]byte{}, []byte(input.Password))
Expand Down

0 comments on commit 258819c

Please sign in to comment.