Disables calls to custom API endpoints.
This commit is contained in:
parent
bf18fa03a2
commit
45fbd699a9
|
@ -13,8 +13,9 @@ namespace CodexPlugin
|
||||||
string GetName();
|
string GetName();
|
||||||
CodexDebugResponse GetDebugInfo();
|
CodexDebugResponse GetDebugInfo();
|
||||||
CodexDebugPeerResponse GetDebugPeer(string peerId);
|
CodexDebugPeerResponse GetDebugPeer(string peerId);
|
||||||
CodexDebugBlockExchangeResponse GetDebugBlockExchange();
|
// These debug methods are not available in master-line Codex. Use only for custom builds.
|
||||||
CodexDebugRepoStoreResponse[] GetDebugRepoStore();
|
//CodexDebugBlockExchangeResponse GetDebugBlockExchange();
|
||||||
|
//CodexDebugRepoStoreResponse[] GetDebugRepoStore();
|
||||||
ContentId UploadFile(TrackedFile file);
|
ContentId UploadFile(TrackedFile file);
|
||||||
TrackedFile? DownloadContent(ContentId contentId, string fileLabel = "");
|
TrackedFile? DownloadContent(ContentId contentId, string fileLabel = "");
|
||||||
void ConnectToPeer(ICodexNode node);
|
void ConnectToPeer(ICodexNode node);
|
||||||
|
|
|
@ -57,8 +57,8 @@ namespace ContinuousTests.Tests
|
||||||
|
|
||||||
private void LogRepoStore(ICodexNode codexNode)
|
private void LogRepoStore(ICodexNode codexNode)
|
||||||
{
|
{
|
||||||
var response = codexNode.GetDebugRepoStore();
|
//var response = codexNode.GetDebugRepoStore();
|
||||||
Log.Log($"{codexNode.GetName()} has {string.Join(",", response.Select(r => r.cid))}");
|
//Log.Log($"{codexNode.GetName()} has {string.Join(",", response.Select(r => r.cid))}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LogStoredBytes(ICodexNode node)
|
private void LogStoredBytes(ICodexNode node)
|
||||||
|
@ -90,8 +90,8 @@ namespace ContinuousTests.Tests
|
||||||
|
|
||||||
private void LogBlockExchangeStatus(ICodexNode codexNode, string msg)
|
private void LogBlockExchangeStatus(ICodexNode codexNode, string msg)
|
||||||
{
|
{
|
||||||
var response = codexNode.GetDebugBlockExchange();
|
//var response = codexNode.GetDebugBlockExchange();
|
||||||
Log.Log($"{codexNode.GetName()} {msg}: {JsonConvert.SerializeObject(response)}");
|
//Log.Log($"{codexNode.GetName()} {msg}: {JsonConvert.SerializeObject(response)}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,21 +42,22 @@ namespace CodexTests.BasicTests
|
||||||
{
|
{
|
||||||
foreach (var node in nodes)
|
foreach (var node in nodes)
|
||||||
{
|
{
|
||||||
Time.Retry(() => AssertBlockExchangeIsEmpty(node), nameof(AssertExchangeIsEmpty));
|
// API Call not available in master-line Codex image.
|
||||||
|
//Time.Retry(() => AssertBlockExchangeIsEmpty(node), nameof(AssertExchangeIsEmpty));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AssertBlockExchangeIsEmpty(ICodexNode node)
|
//private void AssertBlockExchangeIsEmpty(ICodexNode node)
|
||||||
{
|
//{
|
||||||
var msg = $"BlockExchange for {node.GetName()}: ";
|
// var msg = $"BlockExchange for {node.GetName()}: ";
|
||||||
var response = node.GetDebugBlockExchange();
|
// var response = node.GetDebugBlockExchange();
|
||||||
foreach (var peer in response.peers)
|
// foreach (var peer in response.peers)
|
||||||
{
|
// {
|
||||||
var activeWants = peer.wants.Where(w => !w.cancel).ToArray();
|
// var activeWants = peer.wants.Where(w => !w.cancel).ToArray();
|
||||||
Assert.That(activeWants.Length, Is.EqualTo(0), msg + "thinks a peer has active wants.");
|
// Assert.That(activeWants.Length, Is.EqualTo(0), msg + "thinks a peer has active wants.");
|
||||||
}
|
// }
|
||||||
Assert.That(response.taskQueue, Is.EqualTo(0), msg + "has tasks in queue.");
|
// Assert.That(response.taskQueue, Is.EqualTo(0), msg + "has tasks in queue.");
|
||||||
Assert.That(response.pendingBlocks, Is.EqualTo(0), msg + "has pending blocks.");
|
// Assert.That(response.pendingBlocks, Is.EqualTo(0), msg + "has pending blocks.");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue