Skip to content

Commit

Permalink
update mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Oct 26, 2023
1 parent 271b68d commit 10e4c96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mock/server/scm.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/go-vela/types"
)

// syncRepo has a param :repo returns mock JSON for a http GET.
// syncRepo has a param :repo returns mock JSON for a http PATCH.
//
// Pass "not-found" to :repo to test receiving a http 404 response.
func syncRepo(c *gin.Context) {
Expand All @@ -27,7 +27,7 @@ func syncRepo(c *gin.Context) {
c.JSON(http.StatusOK, fmt.Sprintf("Repo %s has been synced", r))
}

// syncRepos has a param :org returns mock JSON for a http GET.
// syncRepos has a param :org returns mock JSON for a http PATCH.
//
// Pass "not-found" to :repo to test receiving a http 404 response.
func syncRepos(c *gin.Context) {
Expand Down
4 changes: 2 additions & 2 deletions mock/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ func FakeHandler() http.Handler {
e.DELETE("/api/v1/repos/:org/:repo", removeRepo)
e.PATCH("/api/v1/repos/:org/:repo/repair", repairRepo)
e.PATCH("/api/v1/repos/:org/:repo/chown", chownRepo)
e.GET("/api/v1/scm/repos/:org/:repo/sync", syncRepo)
e.GET("/api/v1/scm/orgs/:org/sync", syncRepos)
e.PATCH("/api/v1/scm/repos/:org/:repo/sync", syncRepo)
e.PATCH("/api/v1/scm/orgs/:org/sync", syncRepos)

// mock endpoints for secret calls
e.GET("/api/v1/secrets/:engine/:type/:org/:name/:secret", getSecret)
Expand Down

0 comments on commit 10e4c96

Please sign in to comment.