Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version to master #249

Merged
merged 43 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8b2a895
Add ability to estimate sync time
ZIMkaRU Dec 12, 2022
08b8407
Emit estimated sync time by ws
ZIMkaRU Jan 2, 2023
23de475
Add ability to activate/deactivate sync time estimate
ZIMkaRU Jan 2, 2023
faf9c11
Activate/deactivate sync time estimate for sync queue
ZIMkaRU Jan 2, 2023
c0c2228
Change sync entrypoint for new progress interface
ZIMkaRU Jan 2, 2023
f607e07
Change data consistency checker for new progress interface
ZIMkaRU Jan 2, 2023
379b5ee
Change getSyncProgress endpoint for new progress interface
ZIMkaRU Jan 2, 2023
0bf6fa3
Fix method chaining for progress service
ZIMkaRU Jan 2, 2023
b8cd14d
Fix returning progress when force pushing sync
ZIMkaRU Jan 2, 2023
a64f16d
Add common test case for getting sync progress finished state
ZIMkaRU Jan 2, 2023
95f5833
Add new sync progress test case to test flows
ZIMkaRU Jan 2, 2023
6a710bf
Merge pull request #245 from ZIMkaRU/feature/add-estimated-sync-time-…
prdn Jan 5, 2023
65bbc24
Add WeightedAveragesReport service type
ZIMkaRU Jan 3, 2023
ea272ea
Make WeightedAveragesReport service
ZIMkaRU Jan 3, 2023
4e9d784
Add WeightedAveragesReport service to di
ZIMkaRU Jan 3, 2023
eec5820
Add getWeightedAveragesReport endpoint to main service
ZIMkaRU Jan 3, 2023
72846a8
Add params schema for getWeightedAveragesReport endpoint
ZIMkaRU Jan 3, 2023
236e603
Add getWeightedAveragesReportCsv endpoint to main service
ZIMkaRU Jan 3, 2023
ad552f0
Add params schema for getWeightedAveragesReportCsv endpoint
ZIMkaRU Jan 3, 2023
6cf50ea
Add csv job data for weighted averages report
ZIMkaRU Jan 3, 2023
b355dc1
Add WeightedAveragesReportCsvWriter service type
ZIMkaRU Jan 4, 2023
8b5eaf0
Add WeightedAveragesReportCsvWriter service to di
ZIMkaRU Jan 4, 2023
5d352fb
Create weighted averages report csv writer
ZIMkaRU Jan 4, 2023
eb01899
Fix csv job data for weighted averages report
ZIMkaRU Jan 4, 2023
e21c15b
Improve csv column order
ZIMkaRU Jan 5, 2023
45e53b4
Improve csv key-headers column order
ZIMkaRU Jan 5, 2023
c27fa73
Add ability to fetch trades for weighted averages report
ZIMkaRU Jan 5, 2023
d337366
Implement trades weighted price calc
ZIMkaRU Jan 5, 2023
db7aea2
Add test coverage for getWeightedAveragesReport endpoint
ZIMkaRU Jan 6, 2023
6ffbfc8
Add test coverage for getWeightedAveragesReportCsv endpoint
ZIMkaRU Jan 6, 2023
66cb71c
Merge pull request #246 from ZIMkaRU/feature/add-weighted-averages-re…
prdn Jan 6, 2023
14f2b0a
Add user token map by email
ZIMkaRU Jan 9, 2023
6ce85bd
Add ability to remove user session by email
ZIMkaRU Jan 9, 2023
0ccccc8
Improve performance for getting user session by email
ZIMkaRU Jan 9, 2023
69b61de
Fix getting session by email
ZIMkaRU Jan 9, 2023
68ded5d
Add test cases for removing users
ZIMkaRU Jan 10, 2023
1718547
Add test cases for removing users to base coverage
ZIMkaRU Jan 10, 2023
fe63e28
Add test cases for removing users to sub-account coverage
ZIMkaRU Jan 10, 2023
8654ba6
Fix removing user session when token is not passed
ZIMkaRU Jan 10, 2023
7422f27
Merge pull request #247 from ZIMkaRU/feature/add-ability-to-sign-out-…
prdn Jan 11, 2023
ba80e20
Update bfx-report-ui sub-module
ZIMkaRU Jan 18, 2023
fead8cf
Bump version up to 4.1.0
ZIMkaRU Jan 18, 2023
a05a82d
Merge pull request #248 from ZIMkaRU/feature/release-version
prdn Jan 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-reports-framework",
"version": "4.0.0",
"version": "4.1.0",
"description": "Bitfinex reports framework",
"main": "worker.js",
"license": "Apache-2.0",
Expand Down
5 changes: 4 additions & 1 deletion test/1-api-sync-mode-sqlite.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const agent = request.agent(app)

const {
apiSyncModeSqliteTestCases,
signUpTestCase
signUpTestCase,
removeUserTestCases
} = require('./test-cases')

let wrkReportServiceApi = null
Expand Down Expand Up @@ -94,4 +95,6 @@ describe('Sync mode API with SQLite', () => {

signUpTestCase(agent, params)
apiSyncModeSqliteTestCases(agent, params)
signUpTestCase(agent, params)
removeUserTestCases(agent, params)
})
98 changes: 8 additions & 90 deletions test/3-api-filter-sync-mode-sqlite.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const {
startEnvironment
} = require('./helpers/helpers.boot')
const {
emptyDB,
delay
emptyDB
} = require('./helpers/helpers.core')
const {
createMockRESTv2SrvWithDate
Expand All @@ -31,7 +30,10 @@ process.env.NODE_CONFIG_DIR = path.join(__dirname, 'config')
const { app } = require('bfx-report-express')
const agent = request.agent(app)

const { signUpTestCase } = require('./test-cases')
const {
signUpTestCase,
getSyncProgressTestCase
} = require('./test-cases')

let wrkReportServiceApi = null
let processorQueue = null
Expand Down Expand Up @@ -120,35 +122,7 @@ describe('API filter', () => {
)
})

it('it should be successfully performed by the getSyncProgress method', async function () {
this.timeout(60000)

while (true) {
const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'getSyncProgress',
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isNumber(res.body.result)

if (
typeof res.body.result !== 'number' ||
res.body.result === 100
) {
break
}

await delay()
}
})
getSyncProgressTestCase(agent, { basePath, auth })

it('it should be successfully performed by the editPublicTradesConf method', async function () {
this.timeout(5000)
Expand All @@ -175,35 +149,7 @@ describe('API filter', () => {
assert.isOk(res.body.result)
})

it('it should be successfully performed by the getSyncProgress method', async function () {
this.timeout(60000)

while (true) {
const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'getSyncProgress',
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isNumber(res.body.result)

if (
typeof res.body.result !== 'number' ||
res.body.result === 100
) {
break
}

await delay()
}
})
getSyncProgressTestCase(agent, { basePath, auth })

it('it should be successfully performed by the editTickersHistoryConf method', async function () {
this.timeout(5000)
Expand All @@ -230,35 +176,7 @@ describe('API filter', () => {
assert.isOk(res.body.result)
})

it('it should be successfully performed by the getSyncProgress method', async function () {
this.timeout(60000)

while (true) {
const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'getSyncProgress',
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isNumber(res.body.result)

if (
typeof res.body.result !== 'number' ||
res.body.result === 100
) {
break
}

await delay()
}
})
getSyncProgressTestCase(agent, { basePath, auth })

it('it should be successfully performed by the api methods', async function () {
this.timeout(10000)
Expand Down
8 changes: 7 additions & 1 deletion test/4-sub-account.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const agent = request.agent(app)
const {
apiSyncModeSqliteTestCases,
additionalApiSyncModeSqliteTestCases,
signUpTestCase
signUpTestCase,
removeUserTestCases
} = require('./test-cases')

let wrkReportServiceApi = null
Expand Down Expand Up @@ -429,5 +430,10 @@ describe('Sub-account', () => {

additionalApiSyncModeSqliteTestCases(agent, params)
})
describe('Removing sub-account API', () => {
before(beforeFn)

removeUserTestCases(agent, params)
})
})
})
96 changes: 6 additions & 90 deletions test/6-update-sub-account.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ const {
} = require('./helpers/helpers.boot')
const {
emptyDB,
getRServiceProxy,
delay
getRServiceProxy
} = require('./helpers/helpers.core')
const {
createMockRESTv2SrvWithDate,
Expand All @@ -31,7 +30,8 @@ const { app } = require('bfx-report-express')
const agent = request.agent(app)

const {
signUpTestCase
signUpTestCase,
getSyncProgressTestCase
} = require('./test-cases')

let wrkReportServiceApi = null
Expand Down Expand Up @@ -289,35 +289,7 @@ describe('Update sub-account', () => {
assert.isOk(res.body.result)
})

it('it should be successfully performed by the getSyncProgress method', async function () {
this.timeout(60000)

while (true) {
const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth: subAccountAuth,
method: 'getSyncProgress',
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isNumber(res.body.result)

if (
typeof res.body.result !== 'number' ||
res.body.result === 100
) {
break
}

await delay()
}
})
getSyncProgressTestCase(agent, { basePath, auth: subAccountAuth })

it('it should be successfully performed by the getLedgers method, without params', async function () {
this.timeout(5000)
Expand Down Expand Up @@ -517,35 +489,7 @@ describe('Update sub-account', () => {
assert.isString(res.body.result.token)
})

it('it should be successfully performed by the getSyncProgress method', async function () {
this.timeout(60000)

while (true) {
const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth: subAccountAuth,
method: 'getSyncProgress',
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isNumber(res.body.result)

if (
typeof res.body.result !== 'number' ||
res.body.result === 100
) {
break
}

await delay()
}
})
getSyncProgressTestCase(agent, { basePath, auth: subAccountAuth })

it('it should be successfully performed by the getUsers method', async function () {
this.timeout(5000)
Expand Down Expand Up @@ -587,35 +531,7 @@ describe('Update sub-account', () => {
})
})

it('it should be successfully performed by the getSyncProgress method', async function () {
this.timeout(60000)

while (true) {
const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth: subAccountAuth,
method: 'getSyncProgress',
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isNumber(res.body.result)

if (
typeof res.body.result !== 'number' ||
res.body.result === 100
) {
break
}

await delay()
}
})
getSyncProgressTestCase(agent, { basePath, auth: subAccountAuth })

it('it should be successfully performed by the getLedgers method, without params', async function () {
this.timeout(5000)
Expand Down
Loading