forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(connector-fabric): fix tests - package io/fs is not in GOROOT
The simple answer was to upgrade to go v1.20.x from v1.15.x, but this caused a series of other problems that also needed to address so the complete list of changes and their motivations are below: 1. The upgrade to go v1.20.6 1.1. We no longer install docker-compose via pip because since v2 it ships with the main docker package itself (they rewrote it in go) 1.2. Added a new "gcompat" apk package which is necessary because of go v1.20.6 as well. Details on this can be found here: golang/go#59305 (comment) 1.3. As part of installing the OpenSSH server, we now must first wipe all openssh* packages due to newly surfaced package version conflicts due to the ones that are prepackaged with the alpine image. Without the purge step it fails like this: => ERROR [17/64] RUN apk add --no-cache openssh augeas 1.1s ------ > [17/64] RUN apk add --no-cache openssh augeas: 0.300 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz 0.560 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz 1.041 ERROR: unable to select packages: 1.043 openssh-client-common-9.3_p1-r3: 1.043 breaks: openssh-client-default-9.3_p2-r0[openssh-client-common=9.3_p2-r0] 2. Upgraded the node-ssh library to v13 because v12 was broken due to changes introduced by the new OpenSSH server. 3. Modified the container image definition so that we have the ability to customize the version of fabric-nodeenv images used internally by the peers of the fabric-samples repository. This was needed so that we can control what version of npm and NodeJS are being used when the chain code installation process is happening (which is just the peer running the `npm install --production` command within the fabric-nodeenv container) 4. The default Fabric version used by the testing infrastructure is now Fabric v2.2.13 and for the NodeJS chain code it is 2.4.2 5. Slightly rearranged the imports & constants in some of the tests which made it easier to verify that the new image is working as intended. 6. The new image built from this dockerfile for Fabric AIO 2.x is tagged on the registry as: `ghcr.io/hyperledger/cactus-fabric2-all-in-one:2023-08-05-issue2358` 7. increased the tap timeout from 900 seconds (15 minutes) to 3600 (an hour) Fixes hyperledger-cacti#2358 Signed-off-by: Peter Somogyvari <[email protected]>
- Loading branch information
Showing
28 changed files
with
400 additions
and
1,225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/is-ssh-exec-ok.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { SSHExecCommandResponse } from "node-ssh"; | ||
import { RuntimeError } from "run-time-error"; | ||
|
||
export function isSshExecOk(res: SSHExecCommandResponse): boolean { | ||
const fnTag = "isSshExecOk()"; | ||
if (!res) { | ||
throw new RuntimeError(`${fnTag} expected arg res to be truthy.`); | ||
} | ||
return res.code === null || res.code === 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 18 additions & 3 deletions
21
...or-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,35 @@ | ||
module github.com/hyperledger/fabric-samples/asset-transfer-private-data/chaincode-go | ||
|
||
go 1.13 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a | ||
github.com/hyperledger/fabric-contract-api-go v1.1.0 | ||
) | ||
|
||
require ( | ||
github.com/PuerkitoBio/purell v1.1.1 // indirect | ||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.3 // indirect | ||
github.com/go-openapi/jsonreference v0.19.4 // indirect | ||
github.com/go-openapi/spec v0.19.8 // indirect | ||
github.com/go-openapi/swag v0.19.9 // indirect | ||
github.com/gobuffalo/envy v1.9.0 // indirect | ||
github.com/gobuffalo/packd v1.0.0 // indirect | ||
github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a | ||
github.com/hyperledger/fabric-contract-api-go v1.1.0 | ||
github.com/gobuffalo/packr v1.30.1 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/hyperledger/fabric-protos-go v0.0.0-20200707132912-fee30f3ccd23 // indirect | ||
github.com/joho/godotenv v1.3.0 // indirect | ||
github.com/mailru/easyjson v0.7.1 // indirect | ||
github.com/rogpeppe/go-internal v1.6.0 // indirect | ||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect | ||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect | ||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect | ||
golang.org/x/net v0.7.0 // indirect | ||
golang.org/x/sys v0.5.0 // indirect | ||
golang.org/x/text v0.7.0 // indirect | ||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect | ||
google.golang.org/grpc v1.53.0 // indirect | ||
google.golang.org/protobuf v1.28.1 // indirect | ||
gopkg.in/yaml.v2 v2.3.0 // indirect | ||
) |
Oops, something went wrong.