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

Chore/lw 11932 drep provider in gha test deployed envs #1546

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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: 2 additions & 0 deletions .github/workflows/test-deploy-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
CLUSTER: ${{ inputs.cluster }}
ENVIRONMENT: ${{ inputs.environment }}
MNEMONIC: ${{ secrets.MNEMONIC }}
BLOCKFROST_BACKEND_PREVIEW: ${{ secrets.BLOCKFROST_BACKEND_PREVIEW }}
BLOCKFROST_BACKEND_PREPROD: ${{ secrets.BLOCKFROST_BACKEND_PREPROD }}
NETWORK: ${{ inputs.network }}
run: |
./src/scripts/generate-dotenv.sh
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TEST_CLIENT_ASSET_PROVIDER=http
TEST_CLIENT_ASSET_PROVIDER_PARAMS='{"baseUrl":"http://localhost:4014/"}'
TEST_CLIENT_CHAIN_HISTORY_PROVIDER=ws
TEST_CLIENT_CHAIN_HISTORY_PROVIDER_PARAMS='{"baseUrl":"http://localhost:4000/"}'
TEST_CLIENT_DREP_PROVIDER='blockfrost'
TEST_CLIENT_DREP_PROVIDER=blockfrost
TEST_CLIENT_DREP_PROVIDER_PARAMS='{"baseUrl":"http://localhost:3015"}'
TEST_CLIENT_HANDLE_PROVIDER=http
TEST_CLIENT_HANDLE_PROVIDER_PARAMS='{"baseUrl":"http://localhost:4011/"}'
Expand Down
10 changes: 8 additions & 2 deletions packages/e2e/src/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ assetProviderFactory.register(BLOCKFROST_PROVIDER, async (params: any, logger):
return new Promise<AssetProvider>(async (resolve) => {
resolve(
new BlockfrostAssetProvider(
new BlockfrostClient({ baseUrl: params.baseUrl }, { rateLimiter: { schedule: (task) => task() } }),
new BlockfrostClient(
{ apiVersion: params.apiVersion, baseUrl: params.baseUrl, projectId: params.projectId },
{ rateLimiter: { schedule: (task) => task() } }
),
logger
)
);
Expand Down Expand Up @@ -190,7 +193,10 @@ drepProviderFactory.register(BLOCKFROST_PROVIDER, async (params: any, logger): P
return new Promise<DRepProvider>(async (resolve) => {
resolve(
new BlockfrostDRepProvider(
new BlockfrostClient({ baseUrl: params.baseUrl }, { rateLimiter: { schedule: (task) => task() } }),
new BlockfrostClient(
{ apiVersion: params.apiVersion, baseUrl: params.baseUrl, projectId: params.projectId },
{ rateLimiter: { schedule: (task) => task() } }
),
logger
)
);
Expand Down
12 changes: 6 additions & 6 deletions packages/e2e/src/scripts/generate-dotenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ esac
case $NETWORK in
preprod)
networkMagic=1
bfUrl="https://cardano-preprod.blockfrost.io"
bfProjectId="${BLOCKFROST_BACKEND_PREPROD}"
;;
preview)
networkMagic=2
;;
sanchonet)
networkMagic=4
bfUrl="https://cardano-preview.blockfrost.io"
bfProjectId="${BLOCKFROST_BACKEND_PREVIEW}"
;;
*)
echo "${NETWORK}: Unknown network"
Expand All @@ -40,9 +41,8 @@ TEST_CLIENT_ASSET_PROVIDER=http
TEST_CLIENT_ASSET_PROVIDER_PARAMS='{\"baseUrl\":\"${url}\"}'
TEST_CLIENT_CHAIN_HISTORY_PROVIDER=ws
TEST_CLIENT_CHAIN_HISTORY_PROVIDER_PARAMS='{\"baseUrl\":\"${url}\"}'
TEST_CLIENT_DREP_PROVIDER: 'blockfrost'
# TODO: use blockfrost URL
TEST_CLIENT_DREP_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:3015"}'
TEST_CLIENT_DREP_PROVIDER=blockfrost
TEST_CLIENT_DREP_PROVIDER_PARAMS='{\"baseUrl\":\"${bfUrl}\",\"projectId\":\"${bfProjectId}\",\"apiVersion\":\"v0\"}'
TEST_CLIENT_HANDLE_PROVIDER=http
TEST_CLIENT_HANDLE_PROVIDER_PARAMS='{\"baseUrl\":\"${url}\"}'
TEST_CLIENT_NETWORK_INFO_PROVIDER=ws
Expand Down
Loading