Let the server test accept the news feeds and the pinned model host (refs #57)
ci / test (postgres) (push) Successful in 11m31s
ci / test (sqlite) (push) Successful in 5m26s
ci / test (postgres) (pull_request) Successful in 10m7s
ci / test (sqlite) (pull_request) Successful in 5m13s
ci / image (push) Successful in 3m12s
ci / image (pull_request) Successful in 1m46s
ci / test (postgres) (push) Successful in 11m31s
ci / test (sqlite) (push) Successful in 5m26s
ci / test (postgres) (pull_request) Successful in 10m7s
ci / test (sqlite) (pull_request) Successful in 5m13s
ci / image (push) Successful in 3m12s
ci / image (pull_request) Successful in 1m46s
The news collector runs alongside the market data in the server test, so its feeds and the Hugging Face download of the classifier can reach the fake network before the assertion: they are the hosts the code declares, nothing else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
78e77818eb
commit
1aede2fc1c
1 file changed
+3
-1
@@ -40,8 +40,10 @@ public sealed class MarketDataServerTests
|
||||
StringAssert.Contains(bySource[MarketDataService.AlpacaSource].GetProperty("note").GetString(), "ALPACA_API_KEY_DEMO");
|
||||
StringAssert.Contains(bySource[MarketDataService.OkxSource].GetProperty("note").GetString(), "3 nuovi");
|
||||
Assert.AreEqual(JsonValueKind.Null, bySource[MarketDataService.OkxSource].GetProperty("lastError").ValueKind);
|
||||
// The news of Phase 7 run on the same network: their feeds and the pinned classifier model, nothing else.
|
||||
var news = Anubis.News.NewsStore.Defaults.Select(s => new Uri(s.Url).Host).Append(Anubis.News.ToneModel.Url.Host).ToHashSet();
|
||||
Assert.IsTrue(network.Urls.All(u => u.Host is "eea.okx.com" or "data.binance.vision" or "nfs.faireconomy.media" or "www.ecb.europa.eu"
|
||||
or "api.alternative.me" or "cdn.cboe.com"), string.Join(", ", network.Urls.Select(u => u.Host).Distinct()));
|
||||
or "api.alternative.me" or "cdn.cboe.com" || news.Contains(u.Host)), string.Join(", ", network.Urls.Select(u => u.Host).Distinct()));
|
||||
Assert.IsFalse(network.Urls.Any(u => u.Host.Contains("alpaca", StringComparison.Ordinal)), "no call to Alpaca without keys");
|
||||
|
||||
var report = await server.TextAsync("/api/data/quality?format=md");
|
||||
|
||||
Reference in new issue
Block a user