Skip to content

Commit

Permalink
add: certificate and permission to client
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosRoGuerra committed Aug 13, 2021
1 parent 698f07f commit 93fd277
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
8 changes: 0 additions & 8 deletions tsuru/client/certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"io/ioutil"
"net/http"
"os"
"strconv"
"strings"
"time"

Expand All @@ -21,13 +20,6 @@ import (
check "gopkg.in/check.v1"
)

func convert(b []byte) string {
s := make([]string, len(b))
for i := range b {
s[i] = strconv.Itoa(int(b[i]))
}
return strings.Join(s, ",")
}
func (s *S) TestCertificateSetRunSuccessfully(c *check.C) {
var stdout, stderr bytes.Buffer
context := cmd.Context{
Expand Down
7 changes: 2 additions & 5 deletions tsuru/client/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,11 @@ func (c *RoleDefaultAdd) Run(ctx *cmd.Context, client *cmd.Client) error {
params.Add(name, val)
}
}
rolname := []string{}
roleMap := make(map[string][]string)
for k := range params {
rolname = append(rolname, k)
for _, n := range params[k] {
roleMap[k] = append(roleMap[k], n)
}
roleMap[k] = append(roleMap[k], params[k]...)
}

rolDef := c.RoleDefAdd(roleMap)
apiClient, err := tsuruClient.ClientFromEnvironment(&tsuru.Configuration{
HTTPClient: client.HTTPClient,
Expand Down

0 comments on commit 93fd277

Please sign in to comment.