harryzcy
dc6ac14cc6
Fix some test but still have works to do
2022-11-01 01:47:34 -04:00
harryzcy
e8af871f98
Limit scope for /api/v1/orgs
2022-11-01 01:23:17 -04:00
harryzcy
d6d6d97520
Apply repo scope to more APIs
2022-10-30 19:09:50 -04:00
harryzcy
37c59c9136
There are so many fixes
2022-10-30 15:46:42 -04:00
harryzcy
b4c35e82bb
Fix typos that causes errors
2022-10-30 04:51:06 -04:00
harryzcy
755faf6402
Fix more integration tests
2022-10-30 04:33:55 -04:00
harryzcy
a282f02de6
Limit token scope for some repo APIs
2022-10-30 01:14:12 -04:00
harryzcy
99f30f6f16
Add more repo scope to integration tests
2022-10-29 21:19:06 -04:00
harryzcy
4464289e5c
Add scope to 'user' api
2022-10-29 19:00:43 -04:00
harryzcy
f3942ef05e
Revert api router and integration tests
2022-10-29 02:42:32 -04:00
harryzcy
17f318368a
Fix many integration test issues
2022-09-10 22:18:17 -04:00
Eng Zer Jun
8b0aaa5f86
test: use T.TempDir
to create temporary test directory ( #21043 )
...
A testing cleanup.
This pull request replaces `os.MkdirTemp` with `t.TempDir`. We can use the `T.TempDir` function from the `testing` package to create temporary directory. The directory created by `T.TempDir` is automatically removed when the test and all its subtests complete.
This saves us at least 2 lines (error check, and cleanup) on every instance, or in some cases adds cleanup that we forgot.
Reference: https://pkg.go.dev/testing#T.TempDir
```go
func TestFoo(t *testing.T) {
// before
tmpDir, err := os.MkdirTemp("", "")
require.NoError(t, err)
defer os.RemoveAll(tmpDir)
// now
tmpDir := t.TempDir()
}
```
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-04 16:14:53 +01:00
Kyle D
c8ded77680
Kd/ci playwright go test ( #20123 )
...
* Add initial playwright config
* Simplify Makefile
* Simplify Makefile
* Use correct config files
* Update playwright settings
* Fix package-lock file
* Don't use test logger for e2e tests
* fix frontend lint
* Allow passing TEST_LOGGER variable
* Init postgres database
* use standard gitea env variables
* Update playwright
* update drone
* Move empty env var to commands
* Cleanup
* Move integrations to subfolder
* tests integrations to tests integraton
* Run e2e tests with go test
* Fix linting
* install CI deps
* Add files to ESlint
* Fix drone typo
* Don't log to console in CI
* Use go test http server
* Add build step before tests
* Move shared init function to common package
* fix drone
* Clean up tests
* Fix linting
* Better mocking for page + version string
* Cleanup test generation
* Remove dependency on gitea binary
* Fix linting
* add initial support for running specific tests
* Add ACCEPT_VISUAL variable
* don't require git-lfs
* Add initial documentation
* Review feedback
* Add logged in session test
* Attempt fixing drone race
* Cleanup and bump version
* Bump deps
* Review feedback
* simplify installation
* Fix ci
* Update install docs
2022-09-02 15:18:23 -04:00