Rename laconic2d to laconicd

This commit is contained in:
neeraj 2024-04-01 15:32:58 +05:30
parent 2e4dcf7e63
commit 332c6fb217
5 changed files with 24 additions and 24 deletions

View File

@ -35,21 +35,21 @@ jobs:
- name: Install registry-cli - name: Install registry-cli
run: yarn global add file:$PWD run: yarn global add file:$PWD
- name: Checkout laconic2d - name: Checkout laconicd
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: "./laconic2d/" path: "./laconicd/"
repository: cerc-io/laconic2d repository: cerc-io/laconic2d # TODO: Update to laconicd after renaming repo
fetch-depth: 0 fetch-depth: 0
ref: main ref: main
- name: Build laconic2d container - name: Build laconicd container
working-directory: ./laconic2d/tests/sdk_tests working-directory: ./laconicd/tests/sdk_tests
run: ./build-laconic2d-container.sh run: ./build-laconicd-container.sh
- name: Start laconic2d container - name: Start laconicd container
env: env:
TEST_AUCTION_ENABLED: true TEST_AUCTION_ENABLED: true
run: docker compose up laconic2d -d run: docker compose up laconicd -d
- name: Run registry-cli tests - name: Run registry-cli tests
run: ./test/run-tests.sh run: ./test/run-tests.sh

View File

@ -51,7 +51,7 @@ Run the chain:
Registering records in registry requires an account. To get account private key run: Registering records in registry requires an account. To get account private key run:
```bash ```bash
laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe
``` ```
In `config.yml` file assign the account private key to `userKey`. In `config.yml` file assign the account private key to `userKey`.

View File

@ -1,14 +1,14 @@
services: services:
laconic2d: laconicd:
restart: unless-stopped restart: unless-stopped
image: cerc/laconic2d:local image: cerc/laconicd:local
command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"] command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
environment: environment:
- TEST_AUCTION_ENABLED - TEST_AUCTION_ENABLED
- TEST_REGISTRY_EXPIRY - TEST_REGISTRY_EXPIRY
- LOGLEVEL - LOGLEVEL
volumes: volumes:
- ./laconic2d/scripts/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh - ./laconicd/scripts/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
healthcheck: healthcheck:
test: ["CMD", "curl", "-v", "http://127.0.0.1:6060"] test: ["CMD", "curl", "-v", "http://127.0.0.1:6060"]
interval: 1s interval: 1s
@ -22,6 +22,6 @@ services:
cli-test-runner: cli-test-runner:
image: cerc/laconic-registry-cli:local image: cerc/laconic-registry-cli:local
depends_on: depends_on:
laconic2d: laconicd:
condition: service_healthy condition: service_healthy
command: tail -F /dev/null command: tail -F /dev/null

View File

@ -17,7 +17,7 @@
* Get account address of test account: * Get account address of test account:
```bash ```bash
laconic2d keys list --keyring-backend test laconicd keys list --keyring-backend test
# - address: laconic10er85pyd7ukw732e88fzv7k0jq205764hye2dx # - address: laconic10er85pyd7ukw732e88fzv7k0jq205764hye2dx
# name: alice # name: alice

View File

@ -1,24 +1,24 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Get the key from laconic2d # Get the key from laconicd
laconic2d_key=$(yes | docker compose exec laconic2d laconic2d keys export alice --keyring-backend test --unarmored-hex --unsafe) laconicd_key=$(yes | docker compose exec laconicd laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe)
# Get the fixturenet account address # Get the fixturenet account address
laconic2d_account_address=$(docker compose exec laconic2d laconic2d keys list --keyring-backend test | awk '/- address:/ {print $3}') laconicd_account_address=$(docker compose exec laconicd laconicd keys list --keyring-backend test | awk '/- address:/ {print $3}')
# Set parameters for the test suite # Set parameters for the test suite
cosmos_chain_id=laconic_9000-1 cosmos_chain_id=laconic_9000-1
laconic2d_rpc_endpoint=http://127.0.0.1:26657 laconicd_rpc_endpoint=http://127.0.0.1:26657
laconic2d_gql_endpoint=http://127.0.0.1:9473/api laconicd_gql_endpoint=http://127.0.0.1:9473/api
# Create the required config # Create the required config
config_file="config.yml" config_file="config.yml"
config=$(cat <<EOL config=$(cat <<EOL
services: services:
registry: registry:
restEndpoint: $laconic2d_rpc_endpoint restEndpoint: $laconicd_rpc_endpoint
gqlEndpoint: $laconic2d_gql_endpoint gqlEndpoint: $laconicd_gql_endpoint
userKey: $laconic2d_key userKey: $laconicd_key
bondId: bondId:
chainId: $cosmos_chain_id chainId: $cosmos_chain_id
gas: 200000 gas: 200000
@ -28,7 +28,7 @@ EOL
echo "$config" > "$config_file" echo "$config" > "$config_file"
# Wait for the laconid endpoint to come up # Wait for the laconid endpoint to come up
docker compose exec laconic2d sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api" docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api"
# Run tests # Run tests
TEST_ACCOUNT=$laconic2d_account_address yarn test TEST_ACCOUNT=$laconicd_account_address yarn test