Skip to content

Commit

Permalink
Update test cases and fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
skmgoldin committed Sep 9, 2020
1 parent 390a822 commit fad2491
Show file tree
Hide file tree
Showing 29 changed files with 73 additions and 57 deletions.
4 changes: 3 additions & 1 deletion pkg/testcases/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ func (c Case) execOperation(ctx context.Context) (*oapi.ExecutorResult, error) {

func (c Case) execGetOperation(ctx context.Context, route string) (*oapi.ExecutorResult, error) {
switch {
case strings.Contains(route, "/validator/"):
return c.execGetValidatorOperation(ctx, route)
case strings.Contains(route, "/node/"):
return c.execGetNodeOperation(ctx, route)
case strings.Contains(route, "/debug/"):
Expand Down Expand Up @@ -185,7 +187,7 @@ func (c Case) execGetValidatorOperation(ctx context.Context, route string) (*oap
return oapi.ExecGetValidatorBlocks(ctx, opts)
case strings.Contains(route, "/attestation_data"):
return oapi.ExecGetValidatorAttestationData(ctx, c.Config.QueryParams)
case strings.Contains(route, "/aggregate_attestations"):
case strings.Contains(route, "/aggregate_attestation"):
return oapi.ExecGetValidatorAggregateAttestation(ctx, c.Config.QueryParams)
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 5 additions & 0 deletions tests/get/v1/beacon/blocks/42/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/blocks/42",
"awaitSlot": 42
}
5 changes: 5 additions & 0 deletions tests/get/v1/beacon/blocks/42/attestations/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/blocks/42/attestations",
"awaitSlot": 42
}
5 changes: 5 additions & 0 deletions tests/get/v1/beacon/blocks/42/root/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/blocks/42/root",
"awaitSlot": 42
}

This file was deleted.

5 changes: 5 additions & 0 deletions tests/get/v1/beacon/headers/42/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/headers/42",
"awaitSlot": 42
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 5 additions & 0 deletions tests/get/v1/beacon/states/42/committees/0/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/states/42/committees/0",
"awaitSlot": 42
}
5 changes: 5 additions & 0 deletions tests/get/v1/beacon/states/42/finality_checkpoints/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/states/42/finality_checkpoints",
"awaitSlot": 42
}
5 changes: 5 additions & 0 deletions tests/get/v1/beacon/states/42/fork/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/states/42/fork",
"awaitSlot": 42
}
5 changes: 5 additions & 0 deletions tests/get/v1/beacon/states/42/root/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/states/42/root",
"awaitSlot": 42
}
5 changes: 5 additions & 0 deletions tests/get/v1/beacon/states/42/validators/0/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/states/42/validators/0",
"awaitSlot": 42
}
5 changes: 5 additions & 0 deletions tests/get/v1/beacon/states/42/validators/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/beacon/states/42/validators",
"awaitSlot": 42
}

This file was deleted.

5 changes: 5 additions & 0 deletions tests/get/v1/debug/states/42/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/debug/beacon/states/42",
"awaitSlot": 42
}
4 changes: 0 additions & 4 deletions tests/get/v1/validator/blocks/2666/200_0.json

This file was deleted.

5 changes: 5 additions & 0 deletions tests/get/v1/validator/blocks/42/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/validator/blocks/42",
"awaitSlot": 42
}
4 changes: 0 additions & 4 deletions tests/get/v1/validator/duties/attester/2666/200_0.json

This file was deleted.

5 changes: 5 additions & 0 deletions tests/get/v1/validator/duties/attester/42/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/validator/duties/attester/42",
"awaitSlot": 42
}
4 changes: 0 additions & 4 deletions tests/get/v1/validator/duties/proposer/2666/200_0.json

This file was deleted.

5 changes: 5 additions & 0 deletions tests/get/v1/validator/duties/proposer/42/200_0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"method": "GET",
"route": "/eth/v1/validator/duties/proposer/42",
"awaitSlot": 42
}

0 comments on commit fad2491

Please sign in to comment.