Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration test error (v230) #21854

Closed
harryzcy opened this issue Nov 18, 2022 · 6 comments · Fixed by #21901
Closed

Migration test error (v230) #21854

harryzcy opened this issue Nov 18, 2022 · 6 comments · Fixed by #21901
Labels

Comments

@harryzcy
Copy link
Contributor

harryzcy commented Nov 18, 2022

Description

Migration v230 is producing the following error

2022/11/18 05:17:49 ...s/setting/setting.go:812:loadFromConf() [I] The provided APP_DATA_PATH: tests/integration/gitea-integration-mysql/data is not absolute - it will be made absolute against the work path: /tmp/go-build1544829216/b001
2022/11/18 05:17:49 ...dules/setting/log.go:288:newLogService() [I] Gitea v
=== Test_UpdateOpenMilestoneCounts (/drone/src/models/migrations/v1_18/v229_test.go:20)
=== Test_AddConfidentialClientColumnToOAuth2ApplicationTable (/drone/src/models/migrations/v1_18/v230_test.go:22)
--- FAIL: Test_AddConfidentialClientColumnToOAuth2ApplicationTable (0.14s)
    v230_test.go:22: no fixtures found in: /drone/src/models/migrations/fixtures/Test_AddConfidentialClientColumnToOAuth2ApplicationTable
    v230_test.go:44: 
        	Error Trace:	/drone/src/models/migrations/v1_18/v230_test.go:44
        	Error:      	Should NOT be empty, but was []
        	Test:       	Test_AddConfidentialClientColumnToOAuth2ApplicationTable
FAIL
FAIL	code.gitea.io/gitea/models/migrations/v1_18	0.601s
FAIL

Gitea Version

main (c144942)

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

In integration test on Drone

Database

No response

@lunny
Copy link
Member

lunny commented Nov 21, 2022

Looks like https://drone.gitea.io/go-gitea/gitea/63389 is PASS

@silverwind
Copy link
Member

I have seen this failure in one PR as well: https://drone.gitea.io/go-gitea/gitea/63579/2/14

@zeripath
Copy link
Contributor

I have seen this failure in one PR as well: https://drone.gitea.io/go-gitea/gitea/63579/2/14

That one is an actual bug in that PR as I wrote in my comments on that PR and provided suggestions to fix.

@silverwind
Copy link
Member

Also seen on other unrelated PRs. I'd say the test is definitely flaky:

https://drone.gitea.io/go-gitea/gitea/63619/2/16

@zeripath
Copy link
Contributor

Also seen on other unrelated PRs. I'd say the test is definitely flaky:

https://drone.gitea.io/go-gitea/gitea/63619/2/16

=== TestExportUserGPGKeys (/drone/src/tests/integration/user_test.go:157)
--- FAIL: TestExportUserGPGKeys (0.80s)
    user_test.go:237: Testing username user1 export gpg keys
    testlogger.go:78: 2022/11/22 03:37:28 ...eb/routing/logger.go:99:func1() [I] [637c43f8] router: completed GET /user1.gpg for , 200 OK in 6.5ms @ user/home.go:750(user.ShowGPGKeys)
    testlogger.go:78: 2022/11/22 03:37:28 ...eb/routing/logger.go:99:func1() [I] [637c43f8-2] router: completed GET /user/settings/applications for , 200 OK in 40.9ms @ setting/applications.go:24(setting.Applications)
    testlogger.go:78: 2022/11/22 03:37:28 ...eb/routing/logger.go:99:func1() [I] [637c43f8-3] router: completed POST /user/settings/applications for , 303 See Other in 5.4ms @ context/auth.go:28(context.Toggle)
    testlogger.go:78: 2022/11/22 03:37:28 ...eb/routing/logger.go:99:func1() [I] [637c43f8-4] router: completed GET /user/settings/applications for , 200 OK in 19.5ms @ setting/applications.go:24(setting.Applications)
    user_test.go:169: 
        	Error Trace:	/drone/src/integration_test.go:279
        	            				/drone/src/user_test.go:169
        	Error:      	Should NOT be empty, but was 
        	Test:       	TestExportUserGPGKeys
    testlogger.go:78: 2022/11/22 03:37:28 ...eb/routing/logger.go:99:func1() [I] [637c43f8-5] router: completed POST /api/v1/user/gpg_keys?token= for , 401 Unauthorized in 0.1ms @ v1/api.go:212(v1.reqToken)
    api_gpg_keys_test.go:160: 
        	Error Trace:	/drone/src/integration_test.go:337
        	            				/drone/src/integration_test.go:166
        	            				/drone/src/api_gpg_keys_test.go:160
        	            				/drone/src/user_test.go:170
        	Error:      	Not equal: 
        	            	expected: 201
        	            	actual  : 401
        	Test:       	TestExportUserGPGKeys
        	Messages:   	Request: POST /api/v1/user/gpg_keys?token=
    api_gpg_keys_test.go:160: Response: {"message":"token is required","url":"http://localhost:3003/api/swagger"}
        
    user_test.go:237: Testing username user1 export gpg keys
    testlogger.go:78: 2022/11/22 03:37:28 ...eb/routing/logger.go:99:func1() [I] [637c43f8-6] router: completed GET /user1.gpg for , 200 OK in 5.9ms @ user/home.go:750(user.ShowGPGKeys)
    user_test.go:241: 
        	Error Trace:	/drone/src/user_test.go:241
        	            				/drone/src/user_test.go:202
        	Error:      	Not equal: 
        	            	expected: "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nxsBNBFyy/VUBCADJ7zbM20Z1RWmFoVgp5WkQfI2rU1Vj9cQHes9i42wVLLtcbPeo\nQzubgzvMPITDy7nfWxgSf83E23DoHQ1ACFbQh/6eFSRrjsusp3YQ/08NSfPPbcu8\n0M5G+VGwSfzS5uEcwBVQmHyKdcOZIERTNMtYZx1C3bjLD1XVJHvWz9D72Uq4qeO3\n8SR+lzp5n6ppUakcmRnxt3nGRBj1+hEGkdgzyPo93iy+WioegY2lwCA9xMEo5dah\nBmYxWx51zyiXYlReTaxlyb3/nuSUt8IcW3Q8zjdtJj4Nu8U1SpV8EdaA1I9IPbHW\n510OSLmD3XhqHH5m6mIxL1YoWxk3V7gpDROtABEBAAHNGVVzZXIxIDx1c2VyMUBl\neGFtcGxlLmNvbT7CwI4EEwEIADgWIQTQEbrYxmXsp1z3j7z9+v0I6RSEHwUCXLL9\nVQIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRD9+v0I6RSEH22YCACFqL5+\n6M0m18AMC/pumcpnnmvAS1GrrKTF8nOROA1augZwp1WCNuKw2R6uOJIHANrYECSn\nu7+j6GBP2gbIW8mSAzS6HWCs7GGiPpVtT4wcu8wljUI6BxjpyZtoEkriyBjt6HfK\nrkegbkuySoJvjq4IcO5D1LB1JWgsUjMYQJj/ZpBIzVtjG9QtFSOiT1Hct4PoZHdC\nnsdSgyCkwRZXG+u3kT/wP9F663ba4o16vYlz3dCGo66lF2tyoG3qcyZ1OUzUrnuv\n96ytAzT6XIhrE0nVoBprMxFF5zExotJD3bHjcGBFNLf944bhjKee3U6t9+OsfJVC\nl7N5xxIawCuTQdbfzsBNBFyy/VUBCADe61yGEoTwKfsOKIhxLaNoRmD883O0tiWt\nsoO/HPj9dPQLTOiwXgSgSCd8C+LNxGKct87wgFozpah4tDLC6c0nALuHJ0SLbkfz\n55aRhLeOOcrAydatDp72GroXzqpZ0xZBk5wjIWdgEol2GmVRM8QGbeuakU/HVz5y\nlPzxUUocgdbSi3GE3zbzijQzVJdyL/kw/KP7pKT/PPKKJ2C5NQDLy0XGKEHddXGR\nEWKkVlRalxq/TjfaMR0bi3MpezBsQmp99ATPO/d7trayZUxQHRtXzGFiOXfDHATr\nqN730sODjqvU+mpc/SHCRwh9qWDjZRHSuKU5YDBjb5jIQJivZsQ/ABEBAAHCwHYE\nGAEIACAWIQTQEbrYxmXsp1z3j7z9+v0I6RSEHwUCXLL9VQIbDAAKCRD9+v0I6RSE\nH7WoB/4tXl+97rQ6owPCGSVp1Xbwt2521V7COgsOFRVTRTryEWxRW8mm0S7wQvax\nC0TLXKur6NVYQMn01iyL+FZzRpEWNuYF3f9QeeLJ/+l2DafESNhNTy17+RPmacK6\n21dccpqchByVw/UMDeHSyjQLiG2lxzt8Gfx2gHmSbrq3aWovTGyz6JTffZvfy/n2\n0Hm437OBPazO0gZyXhdV2PE5RSUfvAgm44235tcV5EV0d32TJDfv61+Vr2GUbah6\n7XhJ1v6JYuh8kaYaEz8OpZDeh7f6Ho6PzJrsy/TKTKhGgZNINj1iaPFyOkQgKR5M\nGrE0MHOxUbc9tbtyk0F1SuzREUBH\n=WFf5\n-----END PGP PUBLIC KEY BLOCK-----\n"
        	            	actual  : "-----BEGIN PGP PUBLIC KEY BLOCK-----\nNote: This user hasn't uploaded any GPG keys.\n\n\n=twTO\n-----END PGP PUBLIC KEY BLOCK-----\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,30 +1,6 @@
        	            	 -----BEGIN PGP PUBLIC KEY BLOCK-----
        	            	+Note: This user hasn't uploaded any GPG keys.
        	            	 
        	            	-xsBNBFyy/VUBCADJ7zbM20Z1RWmFoVgp5WkQfI2rU1Vj9cQHes9i42wVLLtcbPeo
        	            	-QzubgzvMPITDy7nfWxgSf83E23DoHQ1ACFbQh/6eFSRrjsusp3YQ/08NSfPPbcu8
        	            	-0M5G+VGwSfzS5uEcwBVQmHyKdcOZIERTNMtYZx1C3bjLD1XVJHvWz9D72Uq4qeO3
        	            	-8SR+lzp5n6ppUakcmRnxt3nGRBj1+hEGkdgzyPo93iy+WioegY2lwCA9xMEo5dah
        	            	-BmYxWx51zyiXYlReTaxlyb3/nuSUt8IcW3Q8zjdtJj4Nu8U1SpV8EdaA1I9IPbHW
        	            	-510OSLmD3XhqHH5m6mIxL1YoWxk3V7gpDROtABEBAAHNGVVzZXIxIDx1c2VyMUBl
        	            	-eGFtcGxlLmNvbT7CwI4EEwEIADgWIQTQEbrYxmXsp1z3j7z9+v0I6RSEHwUCXLL9
        	            	-VQIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRD9+v0I6RSEH22YCACFqL5+
        	            	-6M0m18AMC/pumcpnnmvAS1GrrKTF8nOROA1augZwp1WCNuKw2R6uOJIHANrYECSn
        	            	-u7+j6GBP2gbIW8mSAzS6HWCs7GGiPpVtT4wcu8wljUI6BxjpyZtoEkriyBjt6HfK
        	            	-rkegbkuySoJvjq4IcO5D1LB1JWgsUjMYQJj/ZpBIzVtjG9QtFSOiT1Hct4PoZHdC
        	            	-nsdSgyCkwRZXG+u3kT/wP9F663ba4o16vYlz3dCGo66lF2tyoG3qcyZ1OUzUrnuv
        	            	-96ytAzT6XIhrE0nVoBprMxFF5zExotJD3bHjcGBFNLf944bhjKee3U6t9+OsfJVC
        	            	-l7N5xxIawCuTQdbfzsBNBFyy/VUBCADe61yGEoTwKfsOKIhxLaNoRmD883O0tiWt
        	            	-soO/HPj9dPQLTOiwXgSgSCd8C+LNxGKct87wgFozpah4tDLC6c0nALuHJ0SLbkfz
        	            	-55aRhLeOOcrAydatDp72GroXzqpZ0xZBk5wjIWdgEol2GmVRM8QGbeuakU/HVz5y
        	            	-lPzxUUocgdbSi3GE3zbzijQzVJdyL/kw/KP7pKT/PPKKJ2C5NQDLy0XGKEHddXGR
        	            	-EWKkVlRalxq/TjfaMR0bi3MpezBsQmp99ATPO/d7trayZUxQHRtXzGFiOXfDHATr
        	            	-qN730sODjqvU+mpc/SHCRwh9qWDjZRHSuKU5YDBjb5jIQJivZsQ/ABEBAAHCwHYE
        	            	-GAEIACAWIQTQEbrYxmXsp1z3j7z9+v0I6RSEHwUCXLL9VQIbDAAKCRD9+v0I6RSE
        	            	-H7WoB/4tXl+97rQ6owPCGSVp1Xbwt2521V7COgsOFRVTRTryEWxRW8mm0S7wQvax
        	            	-C0TLXKur6NVYQMn01iyL+FZzRpEWNuYF3f9QeeLJ/+l2DafESNhNTy17+RPmacK6
        	            	-21dccpqchByVw/UMDeHSyjQLiG2lxzt8Gfx2gHmSbrq3aWovTGyz6JTffZvfy/n2
        	            	-0Hm437OBPazO0gZyXhdV2PE5RSUfvAgm44235tcV5EV0d32TJDfv61+Vr2GUbah6
        	            	-7XhJ1v6JYuh8kaYaEz8OpZDeh7f6Ho6PzJrsy/TKTKhGgZNINj1iaPFyOkQgKR5M
        	            	-GrE0MHOxUbc9tbtyk0F1SuzREUBH
        	            	-=WFf5
        	            	+
        	            	+=twTO
        	            	 -----END PGP PUBLIC KEY BLOCK-----
        	Test:       	TestExportUserGPGKeys

This appears unrelated to your last comment and the one mentioned in this issue.

@zeripath
Copy link
Contributor

Now looking at this particular issue:

FAIL: Test_AddConfidentialClientColumnToOAuth2ApplicationTable (0.14s)
    v230_test.go:22: no fixtures found in: /drone/src/models/migrations/fixtures/Test_AddConfidentialClientColumnToOAuth2ApplicationTable

The directory is formed from the name of the current Test but if we check the fixtures directories we see that they're labelled:

/drone/src/models/migrations/fixtures/Test_addConfidentialClientColumnToOAuth2ApplicationTable

When the test name was changed in #21549 these directories should have also been updated.

zeripath added a commit to zeripath/gitea that referenced this issue Nov 22, 2022
Unfortunately go-gitea#21549 changed the name of Testcases without changing their associated fixture
directories.

Fix go-gitea#21854

Signed-off-by: Andrew Thornton <[email protected]>
lunny added a commit that referenced this issue Nov 23, 2022
Unfortunately #21549 changed the name of Testcases without changing
their associated fixture directories.

Fix #21854

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants