Skip to content

Commit

Permalink
update starship context to include timeout, update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed Oct 3, 2024
1 parent 02a26e0 commit d08a45c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions clients/js/__output__/custom-pod-ports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ chains:
defaultPorts:
rpc: 26657
grpc: 9090
grpc-web: 9091
rest: 1317
exposer: 8081
faucet: 8000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ helm repo update
helm search repo starship/devnet --version v0.2.3
Call: deploy()
Log: Installing the helm chart. This is going to take a while.....
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3 --timeout 10m
Log: Run "starship get-pods" to check the status of the cluster
Call: startPortForward()
Log: Attempting to stop any existing port-forwards...
Expand Down Expand Up @@ -46,7 +46,7 @@ exports[`StarshipClient setup 2`] = `
"helm repo add starship https://cosmology-tech.github.io/starship/
helm repo update
helm search repo starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3 --timeout 10m
ps -ef | grep -i 'kubectl port-forward' | grep -v 'grep' | awk '{print $2}'
sleep 2
kubectl port-forward pods/osmosis-1-genesis-0 26657:26657 > /dev/null 2>&1 &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ helm repo update
helm search repo starship/devnet --version v0.2.3
Call: deploy()
Log: Installing the helm chart. This is going to take a while.....
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3 --timeout 10m
Log: Run "starship get-pods" to check the status of the cluster
Call: startPortForward()
Log: Attempting to stop any existing port-forwards...
Expand Down Expand Up @@ -44,7 +44,7 @@ exports[`StarshipClient setup 2`] = `
"helm repo add starship https://cosmology-tech.github.io/starship/
helm repo update
helm search repo starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3 --timeout 10m
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 &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ helm repo update
helm search repo starship/devnet --version v0.2.3
Call: deploy()
Log: Installing the helm chart. This is going to take a while.....
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3 --timeout 10m
Log: Run "starship get-pods" to check the status of the cluster
Call: startPortForward()
Log: Attempting to stop any existing port-forwards...
Expand Down Expand Up @@ -44,7 +44,7 @@ exports[`StarshipClient setup 2`] = `
"helm repo add starship https://cosmology-tech.github.io/starship/
helm repo update
helm search repo starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3
helm install -f ../../__fixtures__/config.yaml osmojs starship/devnet --version v0.2.3 --timeout 10m
ps -ef | grep -i 'kubectl port-forward' | grep -v 'grep' | awk '{print $2}'
sleep 2
kubectl port-forward pods/osmosis-1-genesis-0 26657:26657 > /dev/null 2>&1 &
Expand Down
8 changes: 6 additions & 2 deletions clients/js/packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface StarshipContext {
namespace?: string;
verbose?: boolean;
curdir?: string;
timeout?: string;
}

export const defaultStarshipContext: Partial<StarshipContext> = {
Expand All @@ -30,7 +31,8 @@ export const defaultStarshipContext: Partial<StarshipContext> = {
repoUrl: 'https://cosmology-tech.github.io/starship/',
chart: 'starship/devnet',
namespace: '',
version: ''
version: '',
timeout: '10m',
};

export interface PodPorts {
Expand All @@ -47,7 +49,7 @@ export interface PodPorts {
}

const defaultName: string = 'starship';
const defaultVersion: string = 'v0.2.13';
const defaultVersion: string = 'v0.2.14';

// TODO talk to Anmol about moving these into yaml, if not already possible?
const defaultPorts: PodPorts = {
Expand Down Expand Up @@ -395,6 +397,8 @@ export class StarshipClient implements StarshipClientI {
this.ctx.chart,
'--version',
this.config.version,
'--timeout',
this.ctx.timeout,
...this.getDeployArgs(),
...options
];
Expand Down

0 comments on commit d08a45c

Please sign in to comment.