Merge "services/{application,device}: replace PutX but Put in application clients"
diff --git a/services/application/application/impl.go b/services/application/application/impl.go
index d244b5e..b420b3a 100644
--- a/services/application/application/impl.go
+++ b/services/application/application/impl.go
@@ -61,7 +61,7 @@
results <- struct {
profile string
err error
- }{profile, app.PutX(ctx, profile, envelope, overwrite)}
+ }{profile, app.Put(ctx, profile, envelope, overwrite)}
}(profile)
}
resultsMap := make(map[string]error, len(profiles))
diff --git a/services/application/application/impl_test.go b/services/application/application/impl_test.go
index aff8d72..007d507 100644
--- a/services/application/application/impl_test.go
+++ b/services/application/application/impl_test.go
@@ -185,7 +185,7 @@
if expected, got := "Application envelope added for profile myprofile1.\nApplication envelope added for profile myprofile2.", strings.TrimSpace(stdout.String()); got != expected {
t.Errorf("Unexpected output from put. Got %q, expected %q", got, expected)
}
- if expected1, expected2, got := "PutX(myprofile1, ..., false)\nPutX(myprofile2, ..., false)", "PutX(myprofile2, ..., false)\nPutX(myprofile1, ..., false)", strings.TrimSpace(serverOut.String()); got != expected1 && got != expected2 {
+ if expected1, expected2, got := "Put(myprofile1, ..., false)\nPut(myprofile2, ..., false)", "Put(myprofile2, ..., false)\nPut(myprofile1, ..., false)", strings.TrimSpace(serverOut.String()); got != expected1 && got != expected2 {
t.Errorf("Unexpected output from mock server. Got %q, expected %q or %q", got, expected1, expected2)
}
resetOut()
@@ -197,7 +197,7 @@
if expected, got := "Application envelope added for profile myprofile.", strings.TrimSpace(stdout.String()); got != expected {
t.Errorf("Unexpected output from put. Got %q, expected %q", got, expected)
}
- if expected, got := "PutX(myprofile, ..., true)", strings.TrimSpace(serverOut.String()); got != expected {
+ if expected, got := "Put(myprofile, ..., true)", strings.TrimSpace(serverOut.String()); got != expected {
t.Errorf("Unexpected output from mock server. Got %q, expected %q", got, expected)
}
resetOut()
diff --git a/services/device/device/publish.go b/services/device/device/publish.go
index 4dc2cdb..5862d86 100644
--- a/services/device/device/publish.go
+++ b/services/device/device/publish.go
@@ -174,7 +174,7 @@
envelope.Publisher = security.Blessings{}
}
- if err := appClient.PutX(ctx, profile, envelope, true); err != nil {
+ if err := appClient.Put(ctx, profile, envelope, true); err != nil {
return err
}
fmt.Fprintf(env.Stdout, "Published %q\n", appVON)