Skip to content

Commit 28e3065

Browse files
committed
Implement upload testing
1 parent cba8346 commit 28e3065

File tree

10 files changed

+253
-81
lines changed

10 files changed

+253
-81
lines changed

app/contexts.go

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controllers.go

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/hrefs.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/test/upload_v1_testing.go

Lines changed: 60 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

design/upload.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,18 @@ import (
3434
)
3535

3636
var _ = Resource("upload_v1", func() {
37+
BasePath("/v1/upload")
38+
3739
Action("show", func() {
3840
Description("Retrieve the status of a running command")
3941
Routing(GET("/:id"))
4042
Response(OK, ExecResultV1)
43+
Response(NotFound)
4144
})
4245
Action("serial", func() {
4346
Description("Performs an upload of a sketch over the serial port")
4447
Routing(POST(""))
45-
Payload(ArrayOf(UploadSerialV1))
48+
Payload(UploadSerialV1)
4649
Response(Accepted, func() {
4750
Headers(func() {
4851
Header("Location", String, "Contains the location of the show resource")

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ func Start(opts Opts) {
9595
t := NewToolsV1Controller(service)
9696
app.MountToolsV1Controller(service, t)
9797

98+
// Mount "upload" controller
99+
u := NewUploadV1Controller(service)
100+
app.MountUploadV1Controller(service, u)
101+
98102
// Mount "public" controller
99103
public := NewPublicController(service)
100104
app.MountPublicController(service, public)

0 commit comments

Comments
 (0)