Skip to content

Commit

Permalink
node: (lint) ineffassign, misspell, unconvert (ethereum#305)
Browse files Browse the repository at this point in the history
Date: 2021-01-15 05:52:09-06:00
Signed-off-by: meows <b5c6@protonmail.com>
  • Loading branch information
meowsbits committed Jan 15, 2021
1 parent dc58fc3 commit cf71560
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ func TestOpenRPCMetaSchemaSpec(t *testing.T) {

openRPCSpecFile := "file://./testdata/open-rpc-meta-schema-1.14.0.json"
schema, err := schemaLoader.Compile(gojsonschema.NewReferenceLoader(openRPCSpecFile))
if err != nil {
t.Fatal(err)
}

documentLoader := gojsonschema.NewGoLoader(res)

Expand All @@ -306,7 +309,7 @@ func TestOpenRPCMetaSchemaSpec(t *testing.T) {
// COREGETH_OPENRPC_LATEST_SPEC_ENDPOINT=https://github.com/open-rpc/meta-schema/releases/latest/download/open-rpc-meta-schema.json
var openRPCSpecLatestTestEnvVarName = "COREGETH_OPENRPC_LATEST_SPEC_ENDPOINT"

// TestOpenRPCMetaSchemaSpecLatest compares local JSON spec file with the latest JSON spec published remotelly,
// TestOpenRPCMetaSchemaSpecLatest compares local JSON spec file with the latest JSON spec published remotely,
// so as we keep the local file in sync
func TestOpenRPCMetaSchemaSpecLatest(t *testing.T) {
openRPCSpecLatestEndpoint := os.Getenv(openRPCSpecLatestTestEnvVarName)
Expand Down Expand Up @@ -335,7 +338,7 @@ func TestOpenRPCMetaSchemaSpecLatest(t *testing.T) {
}

var localSpec interface{}
if err := json.Unmarshal([]byte(localJSONFile), &localSpec); err != nil {
if err := json.Unmarshal(localJSONFile, &localSpec); err != nil {
t.Fatalf("failed to unmarshal local JSON spec: %v", err)
}

Expand Down

0 comments on commit cf71560

Please sign in to comment.