Skip to content

Commit 818676f

Browse files
Same for other languages
1 parent cc3c73f commit 818676f

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

dotnet/test/Harness/E2ETestContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ public IReadOnlyDictionary<string, string> GetEnvironment()
9494
Cwd = WorkDir,
9595
CliPath = GetCliPath(_repoRoot),
9696
Environment = GetEnvironment(),
97-
GitHubToken = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("CI")) ? "fake-token-for-e2e-tests" : null,
97+
GitHubToken = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_ACTIONS")) ? "fake-token-for-e2e-tests" : null,
9898
});
9999

100100
public async ValueTask DisposeAsync()
101101
{
102102
// Skip writing snapshots in CI to avoid corrupting them on test failures
103-
var isCI = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("CI"));
103+
var isCI = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_ACTIONS"));
104104
await _proxy.StopAsync(skipWritingCache: isCI);
105105

106106
try { if (Directory.Exists(HomeDir)) Directory.Delete(HomeDir, true); } catch { }

go/internal/e2e/testharness/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func (c *TestContext) NewClient() *copilot.Client {
166166
}
167167

168168
// Use fake token in CI to allow cached responses without real auth
169-
if os.Getenv("CI") == "true" {
169+
if os.Getenv("GITHUB_ACTIONS") == "true" {
170170
options.GitHubToken = "fake-token-for-e2e-tests"
171171
}
172172

python/e2e/test_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ async def test_should_resume_a_session_using_a_new_client(self, ctx: E2ETestCont
183183
assert "2" in answer.data.content
184184

185185
# Resume using a new client
186-
github_token = "fake-token-for-e2e-tests" if os.environ.get("CI") == "true" else None
186+
github_token = "fake-token-for-e2e-tests" if os.environ.get("GITHUB_ACTIONS") == "true" else None
187187
new_client = CopilotClient(
188188
{
189189
"cli_path": ctx.cli_path,

python/e2e/testharness/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ async def setup(self):
6060

6161
# Create the shared client (like Node.js/Go do)
6262
# Use fake token in CI to allow cached responses without real auth
63-
github_token = "fake-token-for-e2e-tests" if os.environ.get("CI") == "true" else None
63+
github_token = "fake-token-for-e2e-tests" if os.environ.get("GITHUB_ACTIONS") == "true" else None
6464
self._client = CopilotClient(
6565
{
6666
"cli_path": self.cli_path,

0 commit comments

Comments
 (0)