Skip to content

WIP: feature: convert tests to Typescript #681

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ Session.vim
.history

# Ignore docs site created
**/site/
**/site/

node_modules/
39 changes: 39 additions & 0 deletions tests/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "simple-import-sort", "unused-imports"],
"rules": {
"simple-import-sort/imports": 1,
"simple-import-sort/exports": 1,
"unused-imports/no-unused-imports": 1,
"@typescript-eslint/no-unused-vars": [
1,
{
"argsIgnorePattern": "React|res|next|^_"
}
],
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
"no-console": 0,
"@typescript-eslint/ban-ts-comment": 0,
"prefer-const": 0,
"no-case-declarations": 0,
"no-implicit-globals": 0,
"@typescript-eslint/no-unsafe-declaration-merging": 0
}
}
7 changes: 7 additions & 0 deletions tests/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2
}
21 changes: 21 additions & 0 deletions tests/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Interweb, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
40 changes: 40 additions & 0 deletions tests/configs/agoric.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: starship-e2e-tests
version: 1.7.0

chains:
- id: agoric-3
name: agoric
image: ghcr.io/agoric/agoric-3-proposals:main
numValidators: 1
faucet:
enabled: true
type: starship
ports:
rest: 1313
rpc: 26653
exposer: 38083
resources:
cpu: 1
memory: 2Gi
- id: cosmoshub-4
name: cosmoshub
numValidators: 1
ports:
rest: 1317
rpc: 26657
exposer: 38087
faucet: 8007

relayers:
- name: agoric-cosmos
type: hermes
replicas: 1
chains:
- agoric-3
- cosmoshub-4

registry:
enabled: true
ports:
rest: 8081
grpc: 9091
41 changes: 41 additions & 0 deletions tests/configs/build-chain.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: starship-e2e-tests
version: 1.7.0

chains:
- id: cosmoshub-4
name: cosmoshub
numValidators: 2
ports:
rest: 1317
rpc: 26657
exposer: 38087
- id: core-1
name: persistencecore
numValidators: 2
build:
enabled: true
source: v7.0.0
ports:
rest: 1318
rpc: 26658
exposer: 38088
# For building binary on the fly, resources need to be increased
# Minimum resources required is 1 CPU and 1 GB Ram, if resources are not
# increased, pods will crash. Takes around 8 mins to spin up
resources:
cpu: "2"
memory: "2Gi"

relayers:
- name: persistence-cosmos
type: hermes
replicas: 1
chains:
- core-1
- cosmoshub-4

registry:
enabled: true
ports:
rest: 8081
grpc: 9091
18 changes: 18 additions & 0 deletions tests/configs/eth-lite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: starship-e2e-tests
version: 1.7.0

chains:
- id: 1337
name: ethereum
image: ghcr.io/hyperweb-io/starship/ethereum/client-go:v1.14.12
numValidators: 1
ports:
rest: 8545
rpc: 8551
ws: 8546
resources:
cpu: "200m"
memory: "200Mi"
balances:
- address: "0x0000000000000000000000000000000000000002"
amount: "0x3635c9adc5dea00000"
10 changes: 10 additions & 0 deletions tests/configs/eth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: starship-e2e-tests
version: 1.7.0

chains:
- id: 1337
name: ethereum
numValidators: 1
ports:
rest: 8545
rpc: 8551
34 changes: 34 additions & 0 deletions tests/configs/evmos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: starship-e2e-tests
version: 1.7.0

chains:
- id: evmos_9000-1
name: evmos
image: ghcr.io/cosmology-tech/starship/evmos:v13.0.2
numValidators: 2
ports:
rest: 1313
rpc: 26653
exposer: 38083
- id: cosmoshub-4
name: cosmoshub
numValidators: 1
ports:
rest: 1317
rpc: 26657
exposer: 38087
faucet: 8007

relayers:
- name: evmos-cosmos
type: hermes
replicas: 1
chains:
- evmos_9000-1
- cosmoshub-4

registry:
enabled: true
ports:
rest: 8081
grpc: 9091
38 changes: 38 additions & 0 deletions tests/configs/hyperweb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: starship-e2e-tests
version: 1.7.0

chains:
- id: test-hyperweb-1
name: hyperweb
numValidators: 2
image: ghcr.io/hyperweb-io/hyperweb:latest
coins: 100000000000000uhyper,100000000000000uhypweb,100000000000000uatom,100000000000000uusdc
ports:
rest: 1317
rpc: 26657
faucet: 8000
exposer: 8001
faucet:
enabled: true

registry:
enabled: true
ports:
rest: 8081

images:
imagePullPolicy: Always

frontends:
- name: playground
type: custom
replicas: 1
image: ghcr.io/hyperweb-io/hyperweb-playground:latest
ports:
rest: 3000
env:
CHAIN_RPC_URL: http://localhost:26657
CHAIN_FAUCET_URL: http://localhost:8000
REGISTRY_REST_URL: http://localhost:8081
S3_BUCKET_URL: https://hyperweb-playground.s3.amazonaws.com/create-hyperweb-app
S3_TARBALL_NAME: latest.tar.gz
34 changes: 34 additions & 0 deletions tests/configs/injective.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: starship-e2e-tests
version: 1.7.0

chains:
- id: injective-1
name: injective
numValidators: 2
ports:
rest: 1313
rpc: 26653
exposer: 38083
faucet: 8003
- id: cosmoshub-4
name: cosmoshub
numValidators: 1
ports:
rest: 1317
rpc: 26657
exposer: 38087
faucet: 8007

relayers:
- name: injective-cosmos
type: hermes
replicas: 1
chains:
- injective-1
- cosmoshub-4

registry:
enabled: true
ports:
rest: 8081
grpc: 9091
62 changes: 62 additions & 0 deletions tests/configs/multi-relayer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: starship-e2e-tests
version: 1.7.0

chains:
- id: osmosis-1
name: osmosis
numValidators: 1
faucet:
enabled: false
ports:
rest: 1313
rpc: 26653
exposer: 38083
- id: cosmoshub-4
name: cosmoshub
numValidators: 1
faucet:
enabled: false
ports:
rest: 1317
rpc: 26657
exposer: 38087
- id: juno-2
name: juno
numValidators: 1
faucet:
enabled: false
ports:
rest: 1318
rpc: 26658
exposer: 38088

relayers:
- name: osmos-cosmos
type: hermes
replicas: 1
chains:
- osmosis-1
- cosmoshub-4
ports:
exposer: 3002
- name: juno-cosmos
type: hermes
replicas: 1
chains:
- juno-2
- cosmoshub-4
ports:
exposer: 4002
- name: osmosis-juno
type: hermes
replicas: 1
chains:
- osmosis-1
- juno-2
ports:
exposer: 5002

registry:
enabled: true
ports:
rest: 8081
Loading