Skip to content

Commit 413855e

Browse files
committed
fixed a bunch of issues following recent changes
1 parent 90444f1 commit 413855e

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

pkg/controller/projects_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestPullProjectsFromWildcard(t *testing.T) {
1717

1818
mux.HandleFunc("/api/v4/projects",
1919
func(w http.ResponseWriter, r *http.Request) {
20-
fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo","jobs_enabled":false},{"id":2,"path_with_namespace":"bar","jobs_enabled":true}]`)
20+
fmt.Fprint(w, `[{"id":2,"path_with_namespace":"bar","jobs_enabled":true}]`)
2121
})
2222

2323
w := config.NewWildcard()

pkg/gitlab/environments.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (c *Client) GetEnvironment(
127127
"project-name": project,
128128
"environment-name": e.Name,
129129
}).
130-
Warn("no deployments found for the environment")
130+
Debug("no deployments found for the environment")
131131

132132
return
133133
}

pkg/gitlab/projects.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,6 @@ func (c *Client) ListProjects(ctx context.Context, w config.Wildcard) ([]schemas
134134
continue
135135
}
136136

137-
if !gp.JobsEnabled {
138-
log.WithFields(logFields).WithFields(log.Fields{
139-
"project-id": gp.ID,
140-
"project-name": gp.PathWithNamespace,
141-
}).Debug("jobs/pipelines not enabled on project, skipping")
142-
143-
continue
144-
}
145-
146137
p := schemas.NewProject(gp.PathWithNamespace)
147138
p.ProjectParameters = w.ProjectParameters
148139
projects = append(projects, p)

pkg/gitlab/projects_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func TestListUserProjects(t *testing.T) {
4444
mux.HandleFunc(fmt.Sprintf("/api/v4/users/%s/projects", w.Owner.Name),
4545
func(w http.ResponseWriter, r *http.Request) {
4646
assert.Equal(t, r.Method, "GET")
47-
fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo/bar","jobs_enabled":true},{"id":2,"path_with_namespace":"bar/baz","jobs_enabled":true}]`)
47+
fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo/bar"},{"id":2,"path_with_namespace":"bar/baz"}]`)
4848
})
4949

5050
projects, err := c.ListProjects(ctx, w)
@@ -70,7 +70,7 @@ func TestListGroupProjects(t *testing.T) {
7070
mux.HandleFunc(fmt.Sprintf("/api/v4/groups/%s/projects", w.Owner.Name),
7171
func(w http.ResponseWriter, r *http.Request) {
7272
assert.Equal(t, r.Method, "GET")
73-
fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo/bar","jobs_enabled":true},{"id":2,"path_with_namespace":"bar/baz","jobs_enabled":true}]`)
73+
fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo/bar"},{"id":2,"path_with_namespace":"bar/baz"}]`)
7474
})
7575

7676
projects, err := c.ListProjects(ctx, w)
@@ -96,7 +96,7 @@ func TestListProjects(t *testing.T) {
9696
mux.HandleFunc("/api/v4/projects",
9797
func(w http.ResponseWriter, r *http.Request) {
9898
assert.Equal(t, r.Method, "GET")
99-
fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo","jobs_enabled":false},{"id":2,"path_with_namespace":"bar","jobs_enabled":true}]`)
99+
fmt.Fprint(w, `[{"id":2,"path_with_namespace":"bar"}]`)
100100
})
101101

102102
projects, err := c.ListProjects(ctx, w)

0 commit comments

Comments
 (0)