-
Notifications
You must be signed in to change notification settings - Fork 973
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/display-privatekey-discreetly
- Loading branch information
Showing
47 changed files
with
783 additions
and
329 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
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,115 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
go-version: | ||
description: 'Go version' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
api_tests: | ||
name: Integration Tests API | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: run API tests | ||
run: make test-integration TAGS=api | ||
|
||
blob_tests: | ||
name: Integration Tests Blob | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: run blob tests | ||
run: make test-integration TAGS=blob | ||
|
||
fraud_tests: | ||
name: Integration Tests Fraud | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: run fraud tests | ||
run: make test-integration TAGS=fraud | ||
|
||
nd_tests: | ||
name: Integration Tests ND | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: run nd tests | ||
run: make test-integration TAGS=nd | ||
|
||
p2p_tests: | ||
name: Integration Tests p2p | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: run p2p tests | ||
run: make test-integration TAGS=p2p | ||
|
||
reconstruction_tests: | ||
name: Integration Tests Reconstruction | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: run reconstruction tests | ||
run: make test-integration SHORT=true TAGS=reconstruction | ||
|
||
sync_tests: | ||
name: Integration Tests Sync | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: run sync tests | ||
run: make test-integration SHORT=true TAGS=sync |
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,73 @@ | ||
package gateway | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
) | ||
|
||
func (h *Handler) RegisterEndpoints(rpc *Server) { | ||
// state endpoints | ||
rpc.RegisterHandlerFunc( | ||
fmt.Sprintf("%s/{%s}", balanceEndpoint, addrKey), | ||
h.handleBalanceRequest, | ||
http.MethodGet, | ||
) | ||
|
||
rpc.RegisterHandlerFunc( | ||
submitTxEndpoint, | ||
h.handleSubmitTx, | ||
http.MethodPost, | ||
) | ||
|
||
rpc.RegisterHandlerFunc( | ||
healthEndpoint, | ||
h.handleHealthRequest, | ||
http.MethodGet, | ||
) | ||
|
||
// share endpoints | ||
rpc.RegisterHandlerFunc( | ||
fmt.Sprintf( | ||
"%s/{%s}/height/{%s}", | ||
namespacedSharesEndpoint, | ||
namespaceKey, | ||
heightKey, | ||
), | ||
h.handleSharesByNamespaceRequest, | ||
http.MethodGet, | ||
) | ||
|
||
rpc.RegisterHandlerFunc( | ||
fmt.Sprintf("%s/{%s}", namespacedSharesEndpoint, namespaceKey), | ||
h.handleSharesByNamespaceRequest, | ||
http.MethodGet, | ||
) | ||
|
||
rpc.RegisterHandlerFunc( | ||
fmt.Sprintf("%s/{%s}/height/{%s}", namespacedDataEndpoint, namespaceKey, heightKey), | ||
h.handleDataByNamespaceRequest, | ||
http.MethodGet, | ||
) | ||
|
||
rpc.RegisterHandlerFunc( | ||
fmt.Sprintf("%s/{%s}", namespacedDataEndpoint, namespaceKey), | ||
h.handleDataByNamespaceRequest, | ||
http.MethodGet, | ||
) | ||
|
||
// DAS endpoints | ||
rpc.RegisterHandlerFunc( | ||
fmt.Sprintf("%s/{%s}", heightAvailabilityEndpoint, heightKey), | ||
h.handleHeightAvailabilityRequest, | ||
http.MethodGet, | ||
) | ||
|
||
// header endpoints | ||
rpc.RegisterHandlerFunc( | ||
fmt.Sprintf("%s/{%s}", headerByHeightEndpoint, heightKey), | ||
h.handleHeaderRequest, | ||
http.MethodGet, | ||
) | ||
|
||
rpc.RegisterHandlerFunc(headEndpoint, h.handleHeadRequest, http.MethodGet) | ||
} |
Oops, something went wrong.