Skip to content

Commit 4de68ce

Browse files
versioning for test files and readme update
1 parent ed0b12b commit 4de68ce

File tree

5 files changed

+259
-4
lines changed

5 files changed

+259
-4
lines changed

rolling-shutter/README-dev.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ can install them to the `bin` directory by running
1919

2020
Run `make test` to run the tests
2121

22+
For any static test data, please use `../testdata` folder
23+
2224
## Linting
2325

2426
Run `make lint` to run `golangci-lint`. Run `make lint-changes` to run

rolling-shutter/keyperimpl/gnosis/validatorsyncer_integration_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ func TestAggregateValidationWithData(t *testing.T) {
6161

6262
func mockBeaconClientWithJSONData(t *testing.T) string {
6363
t.Helper()
64-
jsonFile, err := os.Open("../../../testdata/validatorInfo.json")
64+
jsonFile, err := os.Open("../../../testdata/validatorInfo_0x01.json")
6565
assert.NilError(t, err)
6666
defer jsonFile.Close()
6767

6868
byteValue, _ := io.ReadAll(jsonFile)
6969
var result map[string]string
70-
err = json.Unmarshal([]byte(byteValue), &result)
70+
err = json.Unmarshal(byteValue, &result)
7171
assert.NilError(t, err)
7272

7373
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@@ -91,13 +91,13 @@ func mockBeaconClientWithJSONData(t *testing.T) string {
9191

9292
func readMsg(t *testing.T) map[string]string {
9393
t.Helper()
94-
jsonFile, err := os.Open("../../../testdata/signedRegistrations.json")
94+
jsonFile, err := os.Open("../../../testdata/signedRegistrations_0x01.json")
9595
assert.NilError(t, err)
9696
defer jsonFile.Close()
9797

9898
byteValue, _ := io.ReadAll(jsonFile)
9999
var result map[string]string
100-
err = json.Unmarshal([]byte(byteValue), &result)
100+
err = json.Unmarshal(byteValue, &result)
101101
assert.NilError(t, err)
102102
return result
103103
}

0 commit comments

Comments
 (0)