If you add t.Logf("%+v %+v", actual, testCase.expectedErrors) to
the test code, you'll notice that only Errors' Messages are being
compared:
--- PASS: Test_ValidURLValidation/Invalid_schema (0.00s)
binding_test.go:43: [Url] [Url]
FieldNames and Classification are ignored in comparison.
Moreover, an Errors slice with a single Error with empty message
is formatted as '[]' (the same as empty slice), which is also
error-prone. I discovered this when working on #7791 when one test which
was not supposed to pass did pass. https://play.golang.org/p/qC4wVLrm4NG
This commit changes the test to do the comparison properly.
* Prevent Commit Status From Overflowing On Branch Page
It is possible for the commit ci status
on the branches page for a repository to
become an ellipsis due to overflowing.
This commit will fix that issue by
using flex.
Signed-off-by: Gary Kim <gary@garykim.dev>
* Fix multiple overflowing issues in commits table
It was possible that the commit message would
overflow hiding the expand commits button
and commit status. This change ensures that
the correct elements overflow without hiding
anything else.
This change also reverts using flex in the
commits list because it was causing issues
in Blink based browsers.
Signed-off-by: Gary Kim <gary@garykim.dev>
* Remove unnecessary html element and fix indentation issues
- Fixes double line-numbers and padding in Explore > Code > Search
- Moved code-view specific CSS out of their parents to share those
styles better.
- Fix misc issues discovered in code,diff and blame view, especially for
the dark theme.
* Add migration step to remove old repo_indexer_status orphaned records
* Include RepoIndexerStatus struct definition in the migrate function
* Change .Delete(o) into ID(o.ID).Delete(new(RepoIndexerStatus))
* Simplification of the delete procedure
* Rename v91.go to v92.go
* Make repository indexer tokenize by camel case selectable
* Revert "Make repository indexer tokenize by camel case selectable"
This reverts commit a8d4e40af5.
* Remove app.ini setting, permanently remove camel case tokenizer
* Increase repoIndexerLatestVersion to force indexes to be rebuilt
* Changes introduced by the commmand make vendor
* Fix dropTableColumns sqlite implementation
* use droptables and its index dropping support in v78 and v85
* golang-ci fixes
* Add migration from gitea 1.3.3 for sqlite which reveals the droptables bug - thus showing this works
* org/members: display 2FA state
* fix comment typo
* lay down UserList bases
* add basic test for previous methods
* add comment for UserList type
* add valid two-fa account
* test new UserList methods
* optimize MembersIsPublic by side loading info on GetMembers + fix integrations tests
* respect fmt rules
* use map for data
* Optimize GetTwoFaStatus
* rewrite by using existing sub func
* Optimize IsUserOrgOwner
* remove un-used code
* tests: cover empty org + fix import order
* tests: add ErrTeamNotExist path
* tests: fix wrong expected result