This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33ce9a2
commit 5da3410
Showing
6 changed files
with
144 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
ci/utils/__tests__/__snapshots__/client.ports.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`StarshipClient setup 1`] = ` | ||
"Call: setConfig({"chains":[{"name":"osmosis-1","type":"osmosis","image":"pyramation/osmosis:v16.1.0","numValidators":1,"ports":{"rest":1317,"rpc":26657,"faucet":8007}},{"name":"cosmos-2","type":"cosmos","numValidators":1,"ports":{"rest":1313,"rpc":26653,"faucet":8003}}],"relayers":[{"name":"osmos-cosmos","type":"hermes","replicas":1,"chains":["osmosis-1","cosmos-2"]}],"registry":{"enabled":true,"ports":{"rest":8081,"grpc":9091}}}) | ||
Call: setPodPorts({"chains":{"osmosis":{"exposer":98988,"faucet":1000000,"grpc":909090,"rest":6767676}}}) | ||
Call: setup() | ||
helm repo add starship https://cosmology-tech.github.io/starship/ | ||
helm repo update | ||
helm search repo starship/devnet --version v0.1.38 | ||
Call: install() | ||
Log: Installing the helm chart. This is going to take a while..... | ||
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.1.38 | ||
Log: Run "kubectl get pods" to check the status of the cluster | ||
Call: startPortForward() | ||
Log: Attempting to stop any existing port-forwards... | ||
Log: Trying to stop all port-forward, if any.... | ||
ps -ef | grep -i 'kubectl port-forward' | grep -v 'grep' | awk '{print $2}' | ||
sleep 2 | ||
Log: Starting new port forwarding... | ||
kubectl port-forward pods/osmosis-1-genesis-0 1317:6767676 > /dev/null 2>&1 & | ||
Log: Forwarded osmosis-1: local 1317 -> target (host) 6767676 | ||
kubectl port-forward pods/osmosis-1-genesis-0 8007:1000000 > /dev/null 2>&1 & | ||
Log: Forwarded osmosis-1: local 8007 -> target (host) 1000000 | ||
kubectl port-forward pods/cosmos-2-genesis-0 26653:26657 > /dev/null 2>&1 & | ||
Log: Forwarded cosmos-2: local 26653 -> target (host) 26657 | ||
kubectl port-forward pods/cosmos-2-genesis-0 1313:1317 > /dev/null 2>&1 & | ||
Log: Forwarded cosmos-2: local 1313 -> target (host) 1317 | ||
kubectl port-forward pods/cosmos-2-genesis-0 8003:8000 > /dev/null 2>&1 & | ||
Log: Forwarded cosmos-2: local 8003 -> target (host) 8000 | ||
kubectl port-forward service/registry 8081:8080 > /dev/null 2>&1 & | ||
Log: Forwarded registry on port 8081 to target port 8080 | ||
kubectl port-forward service/registry 9091:9090 > /dev/null 2>&1 & | ||
Log: Forwarded registry on port 9091 to target port 9090 | ||
Call: stop() | ||
Log: Trying to stop all port-forward, if any.... | ||
ps -ef | grep -i 'kubectl port-forward' | grep -v 'grep' | awk '{print $2}' | ||
sleep 2 | ||
helm delete osmojs | ||
Call: teardown() | ||
helm repo remove starship" | ||
`; | ||
|
||
exports[`StarshipClient setup 2`] = ` | ||
"helm repo add starship https://cosmology-tech.github.io/starship/ | ||
helm repo update | ||
helm search repo starship/devnet --version v0.1.38 | ||
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.1.38 | ||
ps -ef | grep -i 'kubectl port-forward' | grep -v 'grep' | awk '{print $2}' | ||
sleep 2 | ||
kubectl port-forward pods/osmosis-1-genesis-0 1317:6767676 > /dev/null 2>&1 & | ||
kubectl port-forward pods/osmosis-1-genesis-0 8007:1000000 > /dev/null 2>&1 & | ||
kubectl port-forward pods/cosmos-2-genesis-0 26653:26657 > /dev/null 2>&1 & | ||
kubectl port-forward pods/cosmos-2-genesis-0 1313:1317 > /dev/null 2>&1 & | ||
kubectl port-forward pods/cosmos-2-genesis-0 8003:8000 > /dev/null 2>&1 & | ||
kubectl port-forward service/registry 8081:8080 > /dev/null 2>&1 & | ||
kubectl port-forward service/registry 9091:9090 > /dev/null 2>&1 & | ||
ps -ef | grep -i 'kubectl port-forward' | grep -v 'grep' | awk '{print $2}' | ||
sleep 2 | ||
helm delete osmojs | ||
helm repo remove starship" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { createClient, expectClient } from '../test-utils/client'; | ||
import { config } from '../test-utils/config'; | ||
|
||
describe('StarshipClient', () => { | ||
it('setup', () => { | ||
const { client, ctx } = createClient(); | ||
|
||
client.dependencies.forEach(dep => dep.installed = true); | ||
|
||
client.setConfig(config.config); | ||
client.setPodPorts({ | ||
chains: { | ||
osmosis: { | ||
exposer: 98988, | ||
faucet: 1000000, | ||
grpc: 909090, | ||
rest: 6767676 | ||
} | ||
} | ||
}); | ||
|
||
// helm | ||
client.setup(); | ||
client.install(); | ||
|
||
client.startPortForward(); | ||
|
||
client.stop(); | ||
|
||
// remove helm chart | ||
client.teardown(); | ||
|
||
expectClient(ctx, -1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters