Skip to content

Commit

Permalink
Fix backport merge issues
Browse files Browse the repository at this point in the history
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
  • Loading branch information
nguyer committed Jul 11, 2023
1 parent d866765 commit 812ea5b
Show file tree
Hide file tree
Showing 8 changed files with 1,209 additions and 99 deletions.
16 changes: 10 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
run:
tests: false
skip-dirs:
- "mocks"
- "mocks"
- "ffconfig"
linters-settings:
golint: {}
gocritic:
enabled-checks: []
disabled-checks:
- regexpMust
revive:
rules:
- name: unused-parameter
disabled: true
goheader:
values:
regexp:
COMPANY: .*
template: |-
Copyright © {{ YEAR }} {{ COMPANY }}
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -33,7 +38,6 @@ linters:
disable:
- structcheck
enable:
- depguard
- dogsled
- errcheck
- goconst
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GOGC=30

all: build test go-mod-tidy
test: deps lint
$(VGO) test ./internal/... ./pkg/... ./cmd/... ./docs ./ffconfig/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=30s
$(VGO) test ./internal/... ./pkg/... ./cmd/... ./docs ./ffconfig/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=30s ${TEST_ARGS}
coverage.html:
$(VGO) tool cover -html=coverage.txt
coverage: test coverage.html
Expand Down Expand Up @@ -104,4 +104,4 @@ docker:
docker-multiarch:
./docker_build.sh --platform linux/amd64,linux/arm64 $(DOCKER_ARGS)
docs: .ALWAYS
cd docs && bundle install && bundle exec jekyll build && bundle exec htmlproofer --disable-external --allow-hash-href --allow_missing_href true --swap-urls '^/firefly/:/' --ignore-urls /127.0.0.1/,/localhost/ ./_site
cd docs && bundle install && bundle exec jekyll build && bundle exec htmlproofer --disable-external --allow-hash-href --allow_missing_href true --swap-urls '^/firefly/:/' --ignore-urls /127.0.0.1/,/localhost/ ./_site
1,274 changes: 1,190 additions & 84 deletions docs/swagger/swagger.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hyperledger/firefly

go 1.18
go 1.19

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/client/restclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,8 @@ func (client *FireFlyClient) GenerateFFIFromABI(t *testing.T, req *fftypes.FFIGe
return &res
}

func (client *FireFlyClient) CreateFFI(t *testing.T, ffi *fftypes.FFI) (interface{}, error) {
var res interface{}
func (client *FireFlyClient) CreateFFI(t *testing.T, ffi *fftypes.FFI) (*fftypes.FFI, error) {
var res fftypes.FFI
path := client.namespaced(urlContractInterface)
resp, err := client.Client.R().
SetBody(ffi).
Expand All @@ -846,7 +846,7 @@ func (client *FireFlyClient) CreateFFI(t *testing.T, ffi *fftypes.FFI) (interfac
Post(path)
require.NoError(t, err)
require.Equal(t, 200, resp.StatusCode(), "POST %s [%d]: %s", path, resp.StatusCode(), resp.String())
return res, err
return &res, err
}

func (client *FireFlyClient) CreateContractAPI(t *testing.T, name string, ffiReference *fftypes.FFIReference, location *fftypes.JSONAny) (interface{}, error) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/gateway/ethereum_coupon.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (suite *EthereumCouponTestSuite) SetupSuite() {
suite.contractAddress = deployCouponContract(suite.T(), stack.Name, "coupon/coupon.json", suite.ethIdentity)

res, err := suite.testState.client1.CreateFFI(suite.T(), couponFFI())
suite.interfaceID = fftypes.MustParseUUID(res.(map[string]interface{})["id"].(string))
suite.interfaceID = res.ID
suite.T().Logf("interfaceID: %s", suite.interfaceID)
assert.NoError(suite.T(), err)
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/gateway/ethereum_simplestorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (suite *EthereumSimpleStorageTestSuite) SetupSuite() {
suite.contractAddress = deploySimpleStorageContract(suite.T(), stack.Name, "simplestorage/simple_storage.json")

res, err := suite.testState.client1.CreateFFI(suite.T(), simpleStorageFFI())
suite.interfaceID = fftypes.MustParseUUID(res.(map[string]interface{})["id"].(string))
suite.interfaceID = res.ID
suite.T().Logf("interfaceID: %s", suite.interfaceID)
assert.NoError(suite.T(), err)
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/multiparty/ethereum_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (suite *EthereumContractTestSuite) SetupSuite() {
suite.contractAddress = deployContract(suite.T(), stack.Name, "simplestorage/simple_storage.json")

res, err := suite.testState.client1.CreateFFI(suite.T(), simpleStorageFFI())
suite.interfaceID = fftypes.MustParseUUID(res.(map[string]interface{})["id"].(string))
suite.interfaceID = res.ID
suite.T().Logf("interfaceID: %s", suite.interfaceID)
assert.NoError(suite.T(), err)
}
Expand Down

0 comments on commit 812ea5b

Please sign in to comment.