-
Notifications
You must be signed in to change notification settings - Fork 8
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
[LocalNet] Add Path to LocalNet #879
base: main
Are you sure you want to change the base?
Changes from all commits
1cba315
1e7896b
3a9ed50
baa627f
0100e62
ebaf278
7ee1843
b82ad3d
f0b204a
b64a955
92a8e4e
3601174
5b57e3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ var ( | |
keyRingFlag = "--keyring-backend=test" | ||
chainIdFlag = "--chain-id=poktroll" | ||
appGateServerUrl = "http://localhost:42069" // Keeping localhost by default because that is how we run the tests on our machines locally | ||
pathUrl = "localhost:3000" // Keeping localhost by default because that is how we run the tests on our machines locally | ||
) | ||
|
||
func init() { | ||
|
@@ -75,6 +76,11 @@ func init() { | |
if url := os.Getenv("APPGATE_SERVER_URL"); url != "" { | ||
appGateServerUrl = url | ||
} | ||
|
||
// If "APPGATE_SERVER_URL" envar is present, use it for pathUrl | ||
if url := os.Getenv("PATH_URL"); url != "" { | ||
pathUrl = url | ||
} | ||
} | ||
|
||
func TestMain(m *testing.M) { | ||
|
@@ -463,7 +469,9 @@ func (s *suite) TheApplicationSendsTheSupplierASuccessfulRequestForServiceWithPa | |
method = "GET" | ||
} | ||
|
||
res, err := s.pocketd.RunCurlWithRetry(appGateServerUrl, serviceId, method, path, requestData, 5) | ||
// TODO_IN_THIS_PR: Figure out a plan for deprecating appGateServerUrl in a followup (cleaner) PR | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [linter-name (fail-on-found)] reported by reviewdog 🐶 |
||
// res, err := s.pocketd.RunCurlWithRetry(appGateServerUrl, serviceId, method, path, requestData, 5) | ||
res, err := s.pocketd.RunCurlWithRetry(pathUrl, serviceId, method, path, requestData, 5) | ||
require.NoError(s, err, "error sending relay request from app %q to supplier %q for service %q", appName, supplierOperatorName, serviceId) | ||
|
||
var jsonContent json.RawMessage | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
shannon_config: | ||
full_node_config: | ||
rpc_url: tcp://validator-poktroll-validator:26657 | ||
grpc_config: | ||
host_port: validator-poktroll-validator:9090 | ||
insecure: true | ||
# TODO: Allow sovereign soverign apps to sign their own relay requests. | ||
Check warning on line 7 in localnet/kubernetes/path-config-1.yaml GitHub Actions / misspell[misspell] localnet/kubernetes/path-config-1.yaml#L7
Raw output
|
||
gateway_address: pokt15vzxjqklzjtlz7lahe8z2dfe9nm5vxwwmscne4 # gateway1 | ||
gateway_private_key: cf09805c952fa999e9a63a9f434147b0a5abfd10f268879694c6b5a70e1ae177 | ||
# TODO: Populate delegated_app_addres ses from on-chain records. | ||
Check warning on line 10 in localnet/kubernetes/path-config-1.yaml GitHub Actions / misspell[misspell] localnet/kubernetes/path-config-1.yaml#L10
Raw output
|
||
delegated_app_addresses: | ||
- pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4 # app1 | ||
|
||
services: | ||
# Path needs 0021 service ID to handle EVM relays. | ||
"anvil": | ||
alias: anvil |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
shannon_config: | ||
full_node_config: | ||
rpc_url: tcp://validator-poktroll-validator:26657 | ||
grpc_config: | ||
host_port: validator-poktroll-validator:9090 | ||
insecure: true | ||
gateway_address: pokt15w3fhfyc0lttv7r585e2ncpf6t2kl9uh8rsnyz # gateway2 | ||
gateway_private_key: 177ba43cec962ea407f71da9c3994ba685708e82d5d7a6d7da3268e74119bf88 | ||
delegated_app_addresses: | ||
- pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4 # app1 | ||
|
||
services: | ||
"anvil": | ||
alias: anvil |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
shannon_config: | ||
full_node_config: | ||
rpc_url: tcp://validator-poktroll-validator:26657 | ||
grpc_config: | ||
host_port: validator-poktroll-validator:9090 | ||
insecure: true | ||
gateway_address: pokt1zhmkkd0rh788mc9prfq0m2h88t9ge0j83gnxya # gateway3 | ||
gateway_private_key: f73b6f7f0b9c99603c7eeddbf1c419c6f6bbc241f3798e3e4c8da9769ca81c26 | ||
delegated_app_addresses: | ||
- pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4 # app3 | ||
|
||
services: | ||
"anvil": | ||
alias: anvil |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: path-gateway{actor_number} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: path-gateway{actor_number} | ||
template: | ||
metadata: | ||
labels: | ||
app: path-gateway{actor_number} | ||
spec: | ||
containers: | ||
- name: path-gateway | ||
image: path-gateway-local:latest # Local image tag | ||
imagePullPolicy: Never # Ensure Kubernetes uses local image | ||
ports: | ||
- containerPort: 3000 | ||
volumeMounts: | ||
- name: path-config{actor_number} | ||
mountPath: /app/.config.yaml | ||
subPath: .config.yaml | ||
volumes: | ||
- name: path-config{actor_number} | ||
configMap: | ||
name: path-config{actor_number} | ||
items: | ||
- key: path-config-{actor_number}.yaml | ||
path: .config.yaml | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: path-gateway{actor_number} | ||
spec: | ||
selector: | ||
app: path-gateway{actor_number} | ||
ports: | ||
- protocol: TCP | ||
name: rpc | ||
port: {port} | ||
targetPort: 3000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[linter-name (fail-on-found)] reported by reviewdog 🐶
# TODO_IN_THIS_PR(@okdas): Move configs to values and add helm charts for PATH