Skip to content

Commit

Permalink
chore: fix unit tests import
Browse files Browse the repository at this point in the history
Signed-off-by: nikolay <[email protected]>
  • Loading branch information
natanasow committed Sep 13, 2024
1 parent 4cbfd09 commit 219bc0d
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

import app from './server';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { setServerTimeout } from './koaJsonRpc/lib/utils'; // Import the 'setServerTimeout' function from the correct location

async function main() {
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/koaJsonRpc/lib/methodConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
*/

import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import CONSTANTS from '../../../../relay/dist/lib/constants';

const tier1rateLimit = parseInt(
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/koaJsonRpc/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import type { Server } from 'http';
import constants from '@hashgraph/json-rpc-relay/dist/lib/constants';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';

export function hasOwnProperty(obj: any, prop: PropertyKey): boolean {
return Object.prototype.hasOwnProperty.call(obj, prop);
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/rateLimit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import { Logger } from 'pino';
import { formatRequestIdMessage } from '../formatters';
import { Counter, Registry } from 'prom-client';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';

export default class RateLimit {
private duration: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

import { JsonRpcError, MirrorNodeClientError, predefined, Relay, RelayImpl } from '@hashgraph/json-rpc-relay';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { ITracerConfig } from '@hashgraph/json-rpc-relay/src/lib/types';
import { collectDefaultMetrics, Histogram, Registry } from 'prom-client';
import KoaJsonRpc from './koaJsonRpc';
Expand Down
2 changes: 1 addition & 1 deletion packages/server/tests/integration/koaJsonRpc/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import sinon from 'sinon';
import { Server } from 'http';
import * as utils from '../../../src/koaJsonRpc/lib/utils';
import constants from '@hashgraph/json-rpc-relay/dist/lib/constants';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';

describe('utils.ts', () => {
describe('hasOwnProperty', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/server/tests/integration/rateLimiter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import sinon from 'sinon';
import { Registry } from 'prom-client';
import pino, { Logger } from 'pino';
import RateLimit from '../../src/rateLimit';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';

describe('RateLimit', () => {
let logger: Logger;
Expand Down
2 changes: 1 addition & 1 deletion packages/server/tests/integration/server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
*/

import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
EnvProviderService.hotReload();
EnvProviderService.getInstance().appendEnvsFromPath(__dirname + '/test.env');
import Axios, { AxiosInstance } from 'axios';
Expand Down
2 changes: 1 addition & 1 deletion packages/ws-server/tests/acceptance/batchRequest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { expect } from 'chai';
import { ethers, WebSocketProvider } from 'ethers';
import { WsTestConstant, WsTestHelper } from '../helper';
import { predefined } from '@hashgraph/json-rpc-relay/src';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

describe('@web-socket-batch-1 Batch Requests', async function () {
const METHOD_NAME = 'batch_request';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { numberTo0x } from '@hashgraph/json-rpc-relay/src/formatters';
import { ONE_TINYBAR_IN_WEI_HEX } from '@hashgraph/json-rpc-relay/tests/lib/eth/eth-config';
import { AliasAccount } from '@hashgraph/json-rpc-server/tests/types/AliasAccount';
import { Utils } from '@hashgraph/json-rpc-server/tests/helpers/utils';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

describe('@web-socket-batch-2 eth_getTransactionByHash', async function () {
const METHOD_NAME = 'eth_getTransactionByHash';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { WsTestConstant, WsTestHelper } from '../helper';
import { numberTo0x } from '@hashgraph/json-rpc-relay/src/formatters';
import { Utils } from '@hashgraph/json-rpc-server/tests/helpers/utils';
import { AliasAccount } from '@hashgraph/json-rpc-server/tests/types/AliasAccount';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

describe('@release @web-socket-batch-2 eth_getTransactionCount', async function () {
const METHOD_NAME = 'eth_getTransactionCount';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { numberTo0x } from '@hashgraph/json-rpc-relay/src/formatters';
import { ONE_TINYBAR_IN_WEI_HEX } from '@hashgraph/json-rpc-relay/tests/lib/eth/eth-config';
import { Utils } from '@hashgraph/json-rpc-server/tests/helpers/utils';
import { AliasAccount } from '@hashgraph/json-rpc-server/tests/types/AliasAccount';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

describe('@web-socket-batch-2 eth_getTransactionReceipt', async function () {
const METHOD_NAME = 'eth_getTransactionReceipt';
Expand Down
2 changes: 1 addition & 1 deletion packages/ws-server/tests/acceptance/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { app as wsApp } from '@hashgraph/json-rpc-ws-server/dist/webSocketServer
import ServicesClient from '@hashgraph/json-rpc-server/tests/clients/servicesClient';
import { Utils } from '@hashgraph/json-rpc-server/tests/helpers/utils';
import { AliasAccount } from '@hashgraph/json-rpc-server/tests/types/AliasAccount';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

const testLogger = pino({
name: 'hedera-json-rpc-relay',
Expand Down
2 changes: 1 addition & 1 deletion packages/ws-server/tests/acceptance/rateLimiter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { WsTestHelper } from '../helper';
import relayConstants from '@hashgraph/json-rpc-relay/src/lib/constants';
import { AliasAccount } from '@hashgraph/json-rpc-server/tests/types/AliasAccount';
import { IPRateLimitExceeded } from '@hashgraph/json-rpc-server/dist/koaJsonRpc/lib/RpcError';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

describe('@web-socket-ratelimiter Rate Limit Tests', async function () {
const rateLimitTier2 = Number(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { numberTo0x } from '@hashgraph/json-rpc-relay/src/formatters';
import { Utils } from '@hashgraph/json-rpc-server/tests/helpers/utils';
import { AliasAccount } from '@hashgraph/json-rpc-server/tests/types/AliasAccount';
import { ONE_TINYBAR_IN_WEI_HEX } from '@hashgraph/json-rpc-relay/tests/lib/eth/eth-config';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

describe('@web-socket-batch-2 eth_sendRawTransaction', async function () {
const METHOD_NAME = 'eth_sendRawTransaction';
Expand Down
2 changes: 1 addition & 1 deletion packages/ws-server/tests/acceptance/subscribe.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import assertions from '@hashgraph/json-rpc-server/tests/helpers/assertions';
import LogContractJson from '@hashgraph/json-rpc-server/tests/contracts/Logs.json';
import { AliasAccount } from '@hashgraph/json-rpc-server/tests/types/AliasAccount';
import IERC20Json from '@hashgraph/json-rpc-server/tests/contracts/openzeppelin/IERC20.json';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

chai.use(solidity);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { predefined } from '@hashgraph/json-rpc-relay';
import { Utils } from '@hashgraph/json-rpc-server/tests/helpers/utils';
import Assertions from '@hashgraph/json-rpc-server/tests/helpers/assertions';
import { AliasAccount } from '@hashgraph/json-rpc-server/tests/types/AliasAccount';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

chai.use(solidity);

Expand Down
2 changes: 1 addition & 1 deletion packages/ws-server/tests/acceptance/validations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ethers, WebSocketProvider } from 'ethers';
import { WsTestConstant, WsTestHelper } from '../helper';
import { predefined } from '@hashgraph/json-rpc-relay/src';
import { InvalidRequest, MethodNotFound } from '@hashgraph/json-rpc-server/dist/koaJsonRpc/lib/RpcError';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

describe('@release @web-socket-batch-1 JSON-RPC requests validation', async function () {
const BLOCK_NUMBER_METHOD_NAME = 'eth_blockNumber';
Expand Down
2 changes: 1 addition & 1 deletion packages/ws-server/tests/helper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import WebSocket from 'ws';
import { expect } from 'chai';
import { WebSocketProvider } from 'ethers';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/dist/lib/services/envProviderService';
import { EnvProviderService } from '@hashgraph/json-rpc-relay/src/lib/services/envProviderService';

export class WsTestHelper {
static async assertFailInvalidParamsEthersWsProvider(
Expand Down

0 comments on commit 219bc0d

Please sign in to comment.