Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
da32de7
:sparkles: added integration test github action
shravanshetty1 May 9, 2021
6c49f89
:wrench: add integration tests to make file
shravanshetty1 May 9, 2021
4bbe9d2
:green-heart: debugging integration test github action
shravanshetty1 May 9, 2021
b640f26
:green_heart: attempting to fix integration-test github action
shravanshetty1 May 9, 2021
c00e672
:white_check_mark: added testdata controller and added working GetAll…
shravanshetty1 May 9, 2021
5e098a1
:white_check_mark:
shravanshetty1 May 9, 2021
5ca5b5b
:white_check_mark: add GetFileStats rpc integration test
shravanshetty1 May 9, 2021
1a88e6a
:white_check_mark: GetObjectPath integration tests
shravanshetty1 May 9, 2021
92a7530
:white_check_mark: added list entities integration tests
shravanshetty1 May 9, 2021
374535b
:white_check_mark: added GetReferencePath integration test
shravanshetty1 May 9, 2021
2d399fc
:white_check_mark: added GetObjectTree rpc integration tests
shravanshetty1 May 9, 2021
1adbfe5
Merge branch 'master' into 88-integration-tests-2
shravanshetty1 May 9, 2021
bc76432
Merge branch 'grpc' into 88-integration-tests-2
shravanshetty1 May 21, 2021
163688e
:white_check_mark: updated tests and added table driven tests
shravanshetty1 May 21, 2021
fc7383c
:green_heart: fix tests
shravanshetty1 May 21, 2021
8f586d0
Merge branch 'grpc' into 88-integration-tests-2
shravanshetty1 May 21, 2021
f2d004a
:white_check_mark: updated tests to handle metadata
shravanshetty1 May 21, 2021
577a6a0
:green_heart: fix test
shravanshetty1 May 21, 2021
a32fcf2
:white_check_mark: updated tests
shravanshetty1 May 21, 2021
ddb32f3
Merge branch 'grpc' into 88-integration-tests-2
shravanshetty1 May 22, 2021
1f7d3c3
added integration test to make file to fix github action
shravanshetty1 May 22, 2021
caf3733
:art: simplified test implementation
shravanshetty1 May 23, 2021
02da8de
:green_heart: remove uneeded github actions
shravanshetty1 May 23, 2021
71e06a3
:green_heart: renamed github action to test
shravanshetty1 May 23, 2021
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
21 changes: 7 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
VALIDATOR_REGISTRY: ${{ secrets.VALIDATOR_REGISTRY }}

jobs:
build:
test:
runs-on: ubuntu-20.04
steps:
- name: Install Go
Expand All @@ -25,22 +25,15 @@ jobs:
- uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: Build
- name: Build test environment and run tests
run: |
./docker.local/bin/blobber.init.setup.sh
docker network create --driver=bridge --subnet=198.18.0.0/15 --gateway=198.18.0.255 testnet0
./docker.local/bin/build.blobber.sh

test:
runs-on: ubuntu-20.04
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.14.x
- uses: actions/checkout@v2
- name: Test
run: make test

cd docker.local/blobber1
../bin/blobber.start_bls.sh </dev/null &>/dev/null &
cd ../..
make integration-tests
lint:
runs-on: ubuntu-20.04
steps:
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.PHONY: test lint
.PHONY: test lint integration-tests

test:
go test ./...;

lint:
golangci-lint run;
golangci-lint run;

integration-tests:
go test ./... -args integration;
5 changes: 3 additions & 2 deletions code/go/0chain.net/blobber/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func main() {
flag.Parse()

config.SetupDefaultConfig()
config.SetupConfig()
config.SetupConfig("./config")

config.Configuration.DeploymentMode = byte(*deploymentMode)

Expand Down Expand Up @@ -339,10 +339,11 @@ func main() {
methodsOk := handlers.AllowedMethods([]string{"GET", "HEAD", "POST", "PUT",
"DELETE", "OPTIONS"})

common.ConfigRateLimits()
initHandlers(r)
initServer()

grpcServer := handler.NewServerWithMiddlewares(common.ConfigRateLimits())
grpcServer := handler.NewServerWithMiddlewares(common.NewGRPCRateLimiter())
handler.RegisterGRPCServices(r, grpcServer)

rHandler := handlers.CORS(originsOk, headersOk, methodsOk)(r)
Expand Down
4 changes: 2 additions & 2 deletions code/go/0chain.net/blobbercore/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ func SetupDefaultConfig() {
}

/*SetupConfig - setup the configuration system */
func SetupConfig() {
func SetupConfig(configPath string) {
replacer := strings.NewReplacer(".", "_")
viper.SetEnvKeyReplacer(replacer)
viper.AutomaticEnv()
viper.SetConfigName("0chain_blobber")
viper.AddConfigPath("./config")
viper.AddConfigPath(configPath)
err := viper.ReadInConfig() // Find and read the config file
if err != nil { // Handle errors reading the config file
panic(fmt.Errorf("fatal error config file: %s", err))
Expand Down
Loading