Skip to content

Commit

Permalink
PMM-13020 fix grafana test (name was too long)
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Apr 24, 2024
1 parent c949f07 commit 9f7e782
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion managed/services/grafana/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ func (c *Client) createServiceAccount(ctx context.Context, role role, nodeName s
}

// Max length of service account name is 190 chars (default limit in Grafana). In reality it is 187.
// Some test could fail if you will have name longer than 187 chars.
// Some tests could fail if you pass a name longer than 187 chars.
serviceAccountName := fmt.Sprintf("%s-%s", pmmServiceAccountName, nodeName)
b, err := json.Marshal(serviceAccount{Name: serviceAccountName, Role: role.String(), Force: reregister})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion managed/services/grafana/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func TestClient(t *testing.T) {
t.Run(fmt.Sprintf("Service token auth %s", role.String()), func(t *testing.T) {
t.Parallel()

nodeName := fmt.Sprintf("test-node-%s", role)
nodeName := fmt.Sprintf("test-%s", role)
serviceAccountID, err := c.createServiceAccount(ctx, role, nodeName, true, authHeaders)
require.NoError(t, err)
defer func() {
Expand Down

0 comments on commit 9f7e782

Please sign in to comment.