Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
Signed-off-by: nikolay <[email protected]>
  • Loading branch information
natanasow committed Oct 5, 2024
1 parent 3526379 commit 69ee5fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
HEDERA_NETWORK: '{"127.0.0.1:50211":"0.0.3"}'
MIRROR_NODE_URL: 'http://127.0.0.1:5551'
OPERATOR_ID_MAIN: '0.0.1002'
OPERATOR_KEY_MAIN: '302000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
OPERATOR_KEY_MAIN: '302e020100300506032b65700422042077d69b53642d0000000000000000000000000000000000000000000000000000'
SERVER_PORT: '7546'
run: |
docker run -d -p 7546:7546 --name relay relay:latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ describe('ValidationService tests', async function () {
SERVER_PORT: '7546',
};

const hbarLimitFields = {
HBAR_RATE_LIMIT_TINYBAR: '100',
HBAR_DAILY_LIMIT_BASIC: '10',
HBAR_DAILY_LIMIT_EXTENDED: '20',
HBAR_DAILY_LIMIT_PRIVILEGED: '30',
};

it('should fail fast if mandatory env is not passed', async () => {
expect(() => {
ValidationService.startUp({});
Expand Down Expand Up @@ -65,10 +72,8 @@ describe('ValidationService tests', async function () {
expect(() => {
ValidationService.startUp({
...mandatoryStartUpFields,
HBAR_RATE_LIMIT_TINYBAR: '600',
...hbarLimitFields,
HBAR_DAILY_LIMIT_BASIC: '700',
HBAR_DAILY_LIMIT_EXTENDED: '60',
HBAR_DAILY_LIMIT_PRIVILEGED: '80',
});
}).to.throw('HBAR_RATE_LIMIT_TINYBAR can not be less than HBAR_DAILY_LIMIT_BASIC');
});
Expand All @@ -77,10 +82,8 @@ describe('ValidationService tests', async function () {
expect(() => {
ValidationService.startUp({
...mandatoryStartUpFields,
HBAR_RATE_LIMIT_TINYBAR: '100',
HBAR_DAILY_LIMIT_BASIC: '10',
...hbarLimitFields,
HBAR_DAILY_LIMIT_EXTENDED: '2000',
HBAR_DAILY_LIMIT_PRIVILEGED: '30',
});
}).to.throw('HBAR_RATE_LIMIT_TINYBAR can not be less than HBAR_DAILY_LIMIT_EXTENDED');
});
Expand All @@ -89,9 +92,7 @@ describe('ValidationService tests', async function () {
expect(() => {
ValidationService.startUp({
...mandatoryStartUpFields,
HBAR_RATE_LIMIT_TINYBAR: '500',
HBAR_DAILY_LIMIT_BASIC: '20',
HBAR_DAILY_LIMIT_EXTENDED: '250',
...hbarLimitFields,
HBAR_DAILY_LIMIT_PRIVILEGED: '3000',
});
}).to.throw('HBAR_RATE_LIMIT_TINYBAR can not be less than HBAR_DAILY_LIMIT_PRIVILEGED');
Expand Down

0 comments on commit 69ee5fa

Please sign in to comment.