Skip to content

Commit

Permalink
Merge pull request #409 from bitfinexcom/staging
Browse files Browse the repository at this point in the history
Release version to master
  • Loading branch information
prdn authored Aug 28, 2024
2 parents 914ed9e + 6eb5dd2 commit 60e9584
Show file tree
Hide file tree
Showing 65 changed files with 954 additions and 1,359 deletions.
2 changes: 1 addition & 1 deletion bfx-report-ui
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.18.0",
"version": "4.19.0",
"description": "Bitfinex reports framework",
"main": "worker.js",
"license": "Apache-2.0",
Expand Down
52 changes: 17 additions & 35 deletions test/3-api-filter-sync-mode-sqlite.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,55 +124,37 @@ describe('API filter', () => {

getSyncProgressTestCase(agent, { basePath, auth })

it('it should be successfully performed by the editPublicTradesConf method', async function () {
it('it should be successfully performed by the editAllPublicCollsConfs method', async function () {
this.timeout(5000)

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'editPublicTradesConf',
params: [
{
start,
symbol: 'tBTCUSD'
}
],
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

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

getSyncProgressTestCase(agent, { basePath, auth })

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

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'editTickersHistoryConf',
params: [
{
start,
symbol: 'BTC'
}
],
method: 'editAllPublicCollsConfs',
params: {
publicTradesConf: [
{
start,
symbol: 'tBTCUSD'
}
],
tickersHistoryConf: [
{
start,
symbol: 'BTC'
}
]
},
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isBoolean(res.body.result)
assert.isOk(res.body.result)
})

Expand Down
278 changes: 0 additions & 278 deletions test/test-cases/api-sync-mode-sqlite-test-cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,284 +632,6 @@ module.exports = (
assert.isOk(res.body.result)
})

it('it should be successfully performed by the editPublicTradesConf method, where an object is passed', async function () {
this.timeout(5000)

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'editPublicTradesConf',
params: {
start,
symbol: 'tIOTUSD'
},
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isBoolean(res.body.result)
assert.isOk(res.body.result)
})

getSyncProgressTestCase(agent, { basePath, auth })

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

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'editPublicTradesConf',
params: [
{
start,
symbol: 'tBTCUSD'
},
{
start,
symbol: 'tETHUSD'
}
],
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isBoolean(res.body.result)
assert.isOk(res.body.result)
})

getSyncProgressTestCase(agent, { basePath, auth })

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

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

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isArray(res.body.result)
assert.equal(res.body.result.length, 2)

assert.isObject(res.body.result[0])
assert.propertyVal(res.body.result[0], 'symbol', 'tBTCUSD')
assert.propertyVal(res.body.result[0], 'start', start)

assert.isObject(res.body.result[1])
assert.propertyVal(res.body.result[1], 'symbol', 'tETHUSD')
assert.propertyVal(res.body.result[1], 'start', start)
})

it('it should be successfully performed by the editTickersHistoryConf method, where an object is passed', async function () {
this.timeout(5000)

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'editTickersHistoryConf',
params: {
start,
symbol: 'USD'
},
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isBoolean(res.body.result)
assert.isOk(res.body.result)
})

getSyncProgressTestCase(agent, { basePath, auth })

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

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'editTickersHistoryConf',
params: [
{
start,
symbol: 'BTC'
},
{
start,
symbol: 'ETH'
}
],
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isBoolean(res.body.result)
assert.isOk(res.body.result)
})

getSyncProgressTestCase(agent, { basePath, auth })

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

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

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isArray(res.body.result)
assert.equal(res.body.result.length, 2)

assert.isObject(res.body.result[0])
assert.propertyVal(res.body.result[0], 'symbol', 'BTC')
assert.propertyVal(res.body.result[0], 'start', start)

assert.isObject(res.body.result[1])
assert.propertyVal(res.body.result[1], 'symbol', 'ETH')
assert.propertyVal(res.body.result[1], 'start', start)
})

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

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'editStatusMessagesConf',
params: [
{
start,
symbol: 'tBTCF0:USTF0'
}
],
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isBoolean(res.body.result)
assert.isOk(res.body.result)
})

getSyncProgressTestCase(agent, { basePath, auth })

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

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

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isArray(res.body.result)
assert.equal(res.body.result.length, 1)

assert.isObject(res.body.result[0])
assert.propertyVal(res.body.result[0], 'symbol', 'tBTCF0:USTF0')
assert.propertyVal(res.body.result[0], 'start', start)
})

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

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'editCandlesConf',
params: [
{
start,
symbol: 'tBTCUSD',
timeframe: '12h'
}
],
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isBoolean(res.body.result)
assert.isOk(res.body.result)
})

getSyncProgressTestCase(agent, { basePath, auth })

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

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

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isArray(res.body.result)
assert.equal(res.body.result.length, 1)

assert.isObject(res.body.result[0])
assert.propertyVal(res.body.result[0], 'symbol', 'tBTCUSD')
assert.propertyVal(res.body.result[0], 'timeframe', '12h')
assert.propertyVal(res.body.result[0], 'start', start)
})

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

Expand Down
3 changes: 3 additions & 0 deletions workers/loc.api/di/app.deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const RecalcSubAccountLedgersBalancesHook = require(
)
const BetterSqliteDAO = require('../sync/dao/dao.better.sqlite')
const {
PUBLIC_COLLS_CONF_NAMES,
PublicCollsConfAccessors
} = require('../sync/colls.accessors')
const Movements = require('../sync/movements')
Expand Down Expand Up @@ -140,6 +141,7 @@ module.exports = ({
['_SYNC_API_METHODS', TYPES.SYNC_API_METHODS],
['_SYNC_QUEUE_STATES', TYPES.SYNC_QUEUE_STATES],
['_CHECKER_NAMES', TYPES.CHECKER_NAMES],
['_PUBLIC_COLLS_CONF_NAMES', TYPES.PUBLIC_COLLS_CONF_NAMES],
['_prepareResponse', TYPES.PrepareResponse],
['_subAccount', TYPES.SubAccount],
['_progress', TYPES.Progress],
Expand Down Expand Up @@ -206,6 +208,7 @@ module.exports = ({
bind(TYPES.SYNC_API_METHODS).toConstantValue(SYNC_API_METHODS)
bind(TYPES.SYNC_QUEUE_STATES).toConstantValue(SYNC_QUEUE_STATES)
bind(TYPES.CHECKER_NAMES).toConstantValue(CHECKER_NAMES)
bind(TYPES.PUBLIC_COLLS_CONF_NAMES).toConstantValue(PUBLIC_COLLS_CONF_NAMES)
bind(TYPES.GRC_BFX_OPTS).toConstantValue(grcBfxOpts)
bind(TYPES.ProcessMessageManager)
.to(ProcessMessageManager)
Expand Down
Loading

0 comments on commit 60e9584

Please sign in to comment.