daemon: Gitea v1 API adapter (git.westphal.fr is Gitea, not GitLab); fix golang Dockerfile to 1.26; sudo docker in deploy
This commit is contained in:
@@ -43,7 +43,7 @@ func TestGitLabConnectDecodeAndEmptyUser(t *testing.T) {
|
||||
want string
|
||||
}{
|
||||
{"decode-failure", "not json", "decode"},
|
||||
{"empty-username", `{}`, "no username"},
|
||||
{"empty-login", `{}`, "no login"},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
@@ -102,7 +102,7 @@ func TestGitLabStatusStoreFailure(t *testing.T) {
|
||||
|
||||
func TestGitLabConnectStoreFailures(t *testing.T) {
|
||||
up := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
_, _ = w.Write([]byte(`{"username":"alice"}`))
|
||||
_, _ = w.Write([]byte(`{"login":"alice"}`))
|
||||
}))
|
||||
t.Cleanup(up.Close)
|
||||
dead := openTestStore(t)
|
||||
@@ -115,7 +115,7 @@ func TestGitLabConnectStoreFailures(t *testing.T) {
|
||||
|
||||
func TestGitLabReposSkipsEmptyPaths(t *testing.T) {
|
||||
up := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
_, _ = w.Write([]byte(`[{"path_with_namespace":"","name":"X"}]`))
|
||||
_, _ = w.Write([]byte(`[{"full_name":"","name":"X"}]`))
|
||||
}))
|
||||
t.Cleanup(up.Close)
|
||||
store := openTestStore(t)
|
||||
|
||||
Reference in New Issue
Block a user