Skip to content

Commit

Permalink
revert: nodesGetAll test
Browse files Browse the repository at this point in the history
  • Loading branch information
addievo committed Oct 26, 2023
1 parent 935df0c commit 8c0c57f
Showing 1 changed file with 2 additions and 34 deletions.
36 changes: 2 additions & 34 deletions tests/client/handlers/nodes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,8 @@ import Sigchain from '@/sigchain/Sigchain';
import NotificationsManager from '@/notifications/NotificationsManager';
import NodeConnectionManager from '@/nodes/NodeConnectionManager';
import ClientService from '@/client/ClientService';
import {
NodesAdd,
NodesClaim,
NodesFind,
NodesPing,
NodesGetAll,
} from '@/client/handlers';
import {
nodesAdd,
nodesClaim,
nodesFind,
nodesPing,
nodesGetAll,
} from '@/client/callers';
import { NodesAdd, NodesClaim, NodesFind, NodesPing } from '@/client/handlers';
import { nodesAdd, nodesClaim, nodesFind, nodesPing } from '@/client/callers';
import * as keysUtils from '@/keys/utils';
import * as nodesUtils from '@/nodes/utils';
import * as networkUtils from '@/network/utils';
Expand Down Expand Up @@ -245,9 +233,6 @@ describe('nodesClaim', () => {
let rpcClient: RPCClient<{
nodesClaim: typeof nodesClaim;
}>;
let rpcClient2: RPCClient<{
nodesGetAll: typeof nodesGetAll;
}>;
let nodeGraph: NodeGraph;
let taskManager: TaskManager;
let nodeConnectionManager: NodeConnectionManager;
Expand Down Expand Up @@ -367,14 +352,6 @@ describe('nodesClaim', () => {
toError: networkUtils.toError,
logger: logger.getChild(RPCClient.name),
});
rpcClient2 = new RPCClient({
manifest: {
nodesGetAll,
},
streamFactory: () => webSocketClient.connection.newStream(),
toError: networkUtils.toError,
logger: logger.getChild(RPCClient.name),
});
});
afterEach(async () => {
mockedFindGestaltInvite.mockRestore();
Expand Down Expand Up @@ -406,15 +383,6 @@ describe('nodesClaim', () => {
});
expect(response.success).toBeTruthy();
});
test('gets all nodes', async () => {
const response = await rpcClient.methods.nodesClaim({
nodeIdEncoded:
'vrsc24a1er424epq77dtoveo93meij0pc8ig4uvs9jbeld78n9nl0' as NodeIdEncoded,
forceInvite: false,
});
const response2 = await rpcClient2.methods.nodesGetAll({});
expect(response.success).toBeTruthy();
});
test('cannot claim an invalid node', async () => {
await testsUtils.expectRemoteError(
rpcClient.methods.nodesClaim({
Expand Down

0 comments on commit 8c0c57f

Please sign in to comment.