Skip to content

Commit 34050f8

Browse files
Copilotlpcox
andauthored
Rename TestLookupEnrichmentToken to TestLookupGitHubToken and use envutil.LookupGitHubToken()
Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/77d610d5-5c03-4b7d-a5fb-999eaa31a026 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 689e885 commit 34050f8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

internal/server/collaborator_permission_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"net/http/httptest"
99
"testing"
1010

11+
"github.com/github/gh-aw-mcpg/internal/envutil"
1112
"github.com/stretchr/testify/assert"
1213
"github.com/stretchr/testify/require"
1314
)
@@ -226,7 +227,7 @@ func TestGuardBackendCallerNoToken(t *testing.T) {
226227
assert.Contains(t, err.Error(), "no GitHub token available")
227228
}
228229

229-
func TestLookupEnrichmentToken(t *testing.T) {
230+
func TestLookupGitHubToken(t *testing.T) {
230231
tests := []struct {
231232
name string
232233
envVars map[string]string
@@ -287,7 +288,7 @@ func TestLookupEnrichmentToken(t *testing.T) {
287288
for k, v := range tc.envVars {
288289
t.Setenv(k, v)
289290
}
290-
result := lookupEnrichmentToken()
291+
result := envutil.LookupGitHubToken()
291292
assert.Equal(t, tc.expected, result)
292293
})
293294
}

internal/strutil/truncate_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ func TestTruncateWithSuffix(t *testing.T) {
149149

150150
func TestTruncateRunes(t *testing.T) {
151151
tests := []struct {
152-
name string
153-
input string
154-
maxRunes int
155-
expected string
152+
name string
153+
input string
154+
maxRunes int
155+
expected string
156156
}{
157157
{
158158
name: "ASCII string within limit",

0 commit comments

Comments
 (0)