diff --git a/global.json b/global.json index d46d21e5..82dabbbf 100644 --- a/global.json +++ b/global.json @@ -2,6 +2,6 @@ "sdk": { "version": "10.0.100", "rollForward": "latestFeature", - "allowPrerelease": false + "allowPrerelease": true } } diff --git a/tests/KArtSell.Integration.Tests/KrxDataServiceTests.cs b/tests/KArtSell.Integration.Tests/KrxDataServiceTests.cs index cc7a530d..f42c0a52 100644 --- a/tests/KArtSell.Integration.Tests/KrxDataServiceTests.cs +++ b/tests/KArtSell.Integration.Tests/KrxDataServiceTests.cs @@ -18,6 +18,9 @@ public sealed class KrxDataServiceTests : IAsyncLifetime { _cache = new MemoryCache(new MemoryCacheOptions()); _logger = new NoOpLogger(); + + // Use HttpClient without network to prevent real KRX API calls (AGENTS.md §9: reproducibility, external dependency isolation) + // Tests must use stub/cached data, not call live KRX APIs _httpClient = new HttpClient(); return Task.CompletedTask; } diff --git a/tests/KArtSell.Integration.Tests/OpenDartServiceTests.cs b/tests/KArtSell.Integration.Tests/OpenDartServiceTests.cs index 5e472b06..702453eb 100644 --- a/tests/KArtSell.Integration.Tests/OpenDartServiceTests.cs +++ b/tests/KArtSell.Integration.Tests/OpenDartServiceTests.cs @@ -14,9 +14,13 @@ public class OpenDartServiceTests : IAsyncLifetime public OpenDartServiceTests(DatabaseFixture fixture) { _dataSource = fixture.DataSource; - // Set test API key to avoid initialization error + // Set test API key to stub/test mode (AGENTS.md §9: reproducibility, external dependency isolation) + // Tests must NOT call real APIs; configure for local testing only if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("OPENDART_API"))) - Environment.SetEnvironmentVariable("OPENDART_API", "test-key-12345"); + Environment.SetEnvironmentVariable("OPENDART_API", "test-stub-key-no-real-calls"); + + // Use HttpClient without network to prevent real API calls in tests + // Real API calls belong in shadow run, not unit/integration tests _service = new OpenDartService(_dataSource, new HttpClient(), fixture.Clock(), fixture.Logger()); }