Skip to content

Commit

Permalink
Merge branch 'QA-Test' into dependabot/go_modules/golang.org/x/net-0.…
Browse files Browse the repository at this point in the history
…23.0
  • Loading branch information
Luisfc68 committed Aug 15, 2024
2 parents 49f7910 + ad081e5 commit 1773318
Show file tree
Hide file tree
Showing 129 changed files with 31,483 additions and 11,551 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
name: LPS E2E test

on:
push:
branches: [ QA-Test, Stable-Test, master ]
pull_request:
branches:
- '*'
branches: [ QA-Test, Stable-Test, master ]

jobs:
e2e-test:
runs-on: ubuntu-18.04
name: Server initialization and health check
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v3
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version-file: 'go.mod'

- name: Check out repository code
uses: actions/checkout@v2
- name: Update env file
run: cd docker-compose/local/ && ./gh-action-env.sh ${{ secrets.GITHUB_TOKEN }}

- name: Building LPS environment...
run: cd docker-compose/local/ && LPS_STAGE=regtest sh lps-env.sh build

- name: Setting LPS environment up...
run: cd docker-compose/local/ && LPS_STAGE=regtest sh lps-env.sh up && sleep 300
run: cd docker-compose/local/ && LPS_STAGE=regtest sh lps-env.sh up

- name: Checking LPS health...
run: docker ps && curl -X GET http://localhost:8080/health
run: curl -X GET http://localhost:8080/health

- name: Shutting LPS environment down...
run: cd docker-compose/local/ && LPS_STAGE=regtest sh lps-env.sh down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ keystore/
build/
/**/.env.regtest
/**/gh_token.txt
/**/local/cookie_jar.txt
!sample-config.env
/**/*.env
/**/.env*
11 changes: 10 additions & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,13 @@ packages:
RootstockRpcServer:
github.com/rsksmart/liquidity-provider-server/internal/adapters/dataproviders/utils:
interfaces:
HttpClient:
HttpClient:
github.com/rsksmart/liquidity-provider-server/internal/adapters/entrypoints/watcher:
interfaces:
Ticker:
github.com/rsksmart/liquidity-provider-server/internal/adapters/entrypoints/rest/registry:
interfaces:
UseCaseRegistry:
github.com/gorilla/sessions:
interfaces:
Store:
43 changes: 15 additions & 28 deletions OpenApi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,25 +196,25 @@ components:
- status
- providerType
type: object
PeginConfiguration:
PeginConfigurationDTO:
properties:
callFee:
$ref: '#/components/schemas/Wei'
type: string
callTime:
type: integer
maxValue:
$ref: '#/components/schemas/Wei'
type: string
minValue:
$ref: '#/components/schemas/Wei'
type: string
penaltyFee:
$ref: '#/components/schemas/Wei'
type: string
timeForDeposit:
type: integer
type: object
PeginConfigurationRequest:
properties:
configuration:
$ref: '#/components/schemas/PeginConfiguration'
$ref: '#/components/schemas/PeginConfigurationDTO'
type: object
type: object
PeginQuoteDTO:
Expand Down Expand Up @@ -309,11 +309,6 @@ components:
type: object
PeginQuoteRequest:
properties:
bitcoinRefundAddress:
description: 'User Bitcoin refund address. Note: Must be a legacy address,
segwit addresses are not accepted'
example: "0x0"
type: string
callContractArguments:
description: Contract data
example: "0x0"
Expand All @@ -335,7 +330,6 @@ components:
- callContractArguments
- valueToTransfer
- rskRefundAddress
- bitcoinRefundAddress
type: object
PeginQuoteStatusDTO:
properties:
Expand All @@ -351,29 +345,29 @@ components:
- detail
- status
type: object
PegoutConfiguration:
PegoutConfigurationDTO:
properties:
bridgeTransactionMin:
$ref: '#/components/schemas/Wei'
type: string
callFee:
$ref: '#/components/schemas/Wei'
callTime:
type: integer
type: string
expireBlocks:
type: integer
expireTime:
type: integer
maxValue:
$ref: '#/components/schemas/Wei'
type: string
minValue:
$ref: '#/components/schemas/Wei'
type: string
penaltyFee:
$ref: '#/components/schemas/Wei'
type: string
timeForDeposit:
type: integer
type: object
PegoutConfigurationRequest:
properties:
configuration:
$ref: '#/components/schemas/PegoutConfiguration'
$ref: '#/components/schemas/PegoutConfigurationDTO'
type: object
type: object
PegoutQuoteDTO:
Expand Down Expand Up @@ -443,10 +437,6 @@ components:
type: object
PegoutQuoteRequest:
properties:
bitcoinRefundAddress:
description: BitcoinRefundAddress
example: "0x0"
type: string
rskRefundAddress:
description: RskRefundAddress
example: "0x0"
Expand All @@ -462,7 +452,6 @@ components:
- to
- valueToTransfer
- rskRefundAddress
- bitcoinRefundAddress
type: object
PegoutQuoteStatusDTO:
properties:
Expand Down Expand Up @@ -624,8 +613,6 @@ components:
rsk:
type: string
type: object
Wei: {}
entities.Wei: {}
pkg.AcceptQuoteRequest:
properties:
quoteHash:
Expand Down
2 changes: 1 addition & 1 deletion ci/tasks/deploy-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ run:
touch ~/.ssh/known_hosts
ssh-keyscan flyover-01.aws-us-east-1.mainnet.flyover.rifcomputing.net >> ~/.ssh/known_hosts
ssh -o "StrictHostKeyChecking=no" -A [email protected] sh -s << EOF
cd /home/ubuntu/liquidity-provider-server/docker-compose && git pull origin master && docker system prune -f && docker-compose -f docker-compose.yml -f loki-mainnet.yml --env-file .env.mainnet build --no-cache && docker-compose -f docker-compose.yml -f loki-mainnet.yml --env-file .env.mainnet up --force-recreate -d
cd /home/ubuntu/liquidity-provider-server/docker-compose && git pull origin master && docker system prune -f && docker-compose -f docker-compose.yml -f loki-mainnet.yml --env-file .env.mainnet build --build-arg COMMIT_HASH="$(git rev-parse HEAD)" --no-cache && docker-compose -f docker-compose.yml -f loki-mainnet.yml --env-file .env.mainnet up --force-recreate -d
EOF
Expand Down
2 changes: 1 addition & 1 deletion ci/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ run:
touch ~/.ssh/known_hosts
ssh-keyscan flyover-01-testnet.aws-us-east-1.testnet.flyover.rif.technology >> ~/.ssh/known_hosts
ssh -o "StrictHostKeyChecking=no" -A ubuntu@flyover-01-testnet.aws-us-east-1.testnet.flyover.rif.technology sh -s << EOF
cd /home/ubuntu/flyover-deploy/docker-compose && git pull origin Stable-Test && docker system prune -f && docker-compose -f docker-compose.yml -f loki-testnet.yml --env-file .env.testnet build --no-cache && docker-compose -f docker-compose.yml -f loki-testnet.yml --env-file .env.testnet up --force-recreate -d
cd /home/ubuntu/flyover-deploy/docker-compose && git pull origin Stable-Test && docker system prune -f && docker-compose -f docker-compose.yml -f loki-testnet.yml --env-file .env.testnet build --build-arg COMMIT_HASH="$(git rev-parse HEAD)" --no-cache && docker-compose -f docker-compose.yml -f loki-testnet.yml --env-file .env.testnet up --force-recreate -d
EOF
Expand Down
2 changes: 1 addition & 1 deletion cmd/application/lps/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewApplication(initCtx context.Context, env environment.Environment) *Appli
mutexes := environment.NewApplicationMutexes()

useCaseRegistry := registry.NewUseCaseRegistry(env, rootstockRegistry, btcRegistry, dbRegistry, liquidityProvider, messagingRegistry, mutexes)
watcherRegistry := registry.NewWatcherRegistry(env, useCaseRegistry, rootstockRegistry, btcRegistry, liquidityProvider, messagingRegistry)
watcherRegistry := registry.NewWatcherRegistry(env, useCaseRegistry, rootstockRegistry, btcRegistry, liquidityProvider, messagingRegistry, watcher.NewApplicationTickers())

return &Application{
env: env,
Expand Down
Loading

0 comments on commit 1773318

Please sign in to comment.