From 659e73af05af154dda315d025e8b3a12705e4a7e Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 20 Mar 2026 10:21:52 +0100 Subject: [PATCH] fix: use user10 instead of user1 for TOTP fixture to avoid breaking login tests --- pkg/db/fixtures/totp.yml | 4 ++-- pkg/webtests/caldav_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/db/fixtures/totp.yml b/pkg/db/fixtures/totp.yml index 68da6b7fd..e6efe37e9 100644 --- a/pkg/db/fixtures/totp.yml +++ b/pkg/db/fixtures/totp.yml @@ -1,5 +1,5 @@ - id: 1 - user_id: 1 + user_id: 10 secret: 'JBSWY3DPEHPK3PXP' enabled: true - url: 'otpauth://totp/Vikunja:user1?secret=JBSWY3DPEHPK3PXP&issuer=Vikunja' + url: 'otpauth://totp/Vikunja:user10?secret=JBSWY3DPEHPK3PXP&issuer=Vikunja' diff --git a/pkg/webtests/caldav_test.go b/pkg/webtests/caldav_test.go index cc4f04c37..2a3a641b9 100644 --- a/pkg/webtests/caldav_test.go +++ b/pkg/webtests/caldav_test.go @@ -740,9 +740,9 @@ func TestCaldavTOTPBlocksBasicAuth(t *testing.T) { e, _ := setupTestEnv() c, _ := createRequest(e, http.MethodGet, "", nil, nil) - // testuser1 has TOTP enabled via fixtures. + // testuser10 has TOTP enabled via fixtures. // "12345678" is the plaintext password for all test users. - result, err := caldav.BasicAuth(c, testuser1.Username, "12345678") + result, err := caldav.BasicAuth(c, testuser10.Username, "12345678") require.NoError(t, err) assert.False(t, result, "BasicAuth should reject password login when user has TOTP enabled") })