Open cyberwave opened 4 years ago
Can you try building the image:
make clean populate-fixtures docker-thirdparty fabric-peer-docker build-cc fabric-cli
And then run the test manually. If that doesn't work then delete all of you docker images and retry the above.
The latest sidetree-fabric image in docker is: docker.pkg.github.com/trustbloc-cicd/snapshot/peer:amd64-0.1.4-snapshot-50fc7cd
The latest sidetree-fabric image in docker is: docker.pkg.github.com/trustbloc-cicd/snapshot/peer:amd64-0.1.4-snapshot-50fc7cd
This image looks like it's in a private repository, the error info follow the command docker pull docker.pkg.github.com/trustbloc-cicd/snapshot/peer:amd64-0.1.4-snapshot-50fc7cd
is
Error response from daemon: Get https://docker.pkg.github.com/v2/trustbloc-cicd/snapshot/peer/manifests/amd64-0.1.4-snapshot-50fc7cd: no basic auth credentials
The image I am currently using is manually compiled, but it doesnot work
@cyberwave
The latest sidetree-fabric image in docker is: docker.pkg.github.com/trustbloc-cicd/snapshot/peer:amd64-0.1.4-snapshot-50fc7cd
This image looks like it's in a private repository, the error info follow the command
docker pull docker.pkg.github.com/trustbloc-cicd/snapshot/peer:amd64-0.1.4-snapshot-50fc7cd
isError response from daemon: Get https://docker.pkg.github.com/v2/trustbloc-cicd/snapshot/peer/manifests/amd64-0.1.4-snapshot-50fc7cd: no basic auth credentials
The image I am currently using is manually compiled, but it doesnot work
Make sure you've authenticated to github's docker hub.
@cyberwave
The latest sidetree-fabric image in docker is: docker.pkg.github.com/trustbloc-cicd/snapshot/peer:amd64-0.1.4-snapshot-50fc7cd
This image looks like it's in a private repository, the error info follow the command
docker pull docker.pkg.github.com/trustbloc-cicd/snapshot/peer:amd64-0.1.4-snapshot-50fc7cd
isError response from daemon: Get https://docker.pkg.github.com/v2/trustbloc-cicd/snapshot/peer/manifests/amd64-0.1.4-snapshot-50fc7cd: no basic auth credentials
The image I am currently using is manually compiled, but it doesnot work
Make sure you've authenticated to github's docker hub.
the docker.pkg.github.com
have no entry for register or i cannot find it! when i type "https://docker.pkg.github.com/" in the search of browser and get "{"status": "ok", "message": "Hello, world! This is the GitHub Package Registry."}"。
I use the Makefile buid a image and use docker-compose
can running,but the bddtests seem like doesnot work normal!
@cyberwave
the
docker.pkg.github.com
have no entry for register or i cannot find it! when i type "https://docker.pkg.github.com/" in the search of browser and get "{"status": "ok", "message": "Hello, world! This is the GitHub Package Registry."}"。
See this
Now i pull the image docker.pkg.github.com/trustbloc/sidetree-fabric/peer:amd64-0.1.4-snapshot-e27249e
according to the page of https://github.com/trustbloc/sidetree-fabric/packages
and the follow the README.md to run test, the error doesn't missing,
--- Failed steps:
Scenario: Attempt to access the blockchain endpoints without providing an auth token # features/blockchain-handler.feature:264 And fabric-cli is executed with args "ledgerconfig update --configfile ./fixtures/config/fabric/mychannel-org2-config.json --noprompt" # features/blockchain-handler.feature:38 Error: Error: error getting peers from discovery service for channel [mychannel]: error calling discover service send: Multiple errors occurred: - From target: localhost:8051: could not connect to localhost:8051: dialing connection on target [localhost:8051]: waiting for connection failed: context deadline exceeded - From target: localhost:8251: could not connect to localhost:8251: dialing connection on target [localhost:8251]: waiting for connection failed: context deadline exceeded
and use command line,all is ok
PROJECT_PATH=../.. ../../.build/bin/fabric --home .fabriccli ledgerconfig update --configfile ./fixtures/config/fabric/mychannel-org1-config.json --noprompt Configuration successfully updated! ~/goproj/src/github.com/trustbloc/sidetree-fabric/test/bddtests @e27249e8 *6 !4 PROJECT_PATH=../.. ../../.build/bin/fabric --home .fabriccli ledgerconfig update --configfile ./fixtures/config/fabric/mychannel-org2-config.json --noprompt Configuration successfully updated!
what the test result on you envionment? does my result is normal?
I change some code in sidetree-fabric/test/bddtests/fabriccli_steps.go L80 func (d *FabricCLISteps) execute(strArgs string) error
and to fix the error contains context deadline exceeded
。
--- a/test/bddtests/fabriccli_steps.go
+++ b/test/bddtests/fabriccli_steps.go
@@ -9,6 +9,7 @@ package bddtests
import (
"os"
"strings"
+ "time"
"github.com/cucumber/godog"
"github.com/pkg/errors"
@@ -86,13 +87,23 @@ func (d *FabricCLISteps) execute(strArgs string) error {
return err
}
logger.Infof("Executing fabric-cli with args: %s ...", args)
- response, err := NewFabricCLI().Exec(args...)
- logger.Infof("... got response: %s", response)
- if err != nil {
- return err
+ for i := 0; i < 5; i++ {
+ response, err := NewFabricCLI().Exec(args...)
+ logger.Infof("... got response: %s", response)
+ if err != nil {
+ if strings.Contains(err.Error(), "context deadline exceeded") {
+ logger.Errorf("exec failed,err:%s\n current %d times,sleep 10 second, and then try again!", err.Error(), i)
+ time.Sleep(10 * time.Second)
+ continue
+ } else {
+ logger.Errorf("failed exec,err:%s", err.Error())
+ return err
+ }
+ }
+ bddtests.SetResponse(response)
+ break
}
- bddtests.SetResponse(response)
return nil
}
and got a new error:
--- Failed steps:
Scenario: Invalid configuration # features/blockchain-handler.feature:260 When fabric-cli is executed with args "ledgerconfig update --configfile ./fixtures/config/fabric/invalid-blockchainhandler-config.json --noprompt" # features/blockchain-handler.feature:262 Error: Error: Multiple errors occurred: - Transaction processing for endorser [localhost:7251]: Chaincode status Code: (500) UNKNOWN. Description: Error saving config: validation error: invalid component name [/sidetree/0.0.1/invalid] - component name must be set to the base path [/sidetree/0.0.1/blockchain] for (MSP:Org1MSP),(Peer:peer0.org1.example.com),(AppName:blockchain-handler),(AppVersion:1),(Comp:/sidetree/0.0.1/invalid),(CompVersion:0.1.3) - Transaction processing for endorser [localhost:8151]: Chaincode status Code: (500) UNKNOWN. Description: Error saving config: validation error: invalid component name [/sidetree/0.0.1/invalid] - component name must be set to the base path [/sidetree/0.0.1/blockchain] for (MSP:Org1MSP),(Peer:peer0.org1.example.com),(AppName:blockchain-handler),(AppVersion:1),(Comp:/sidetree/0.0.1/invalid),(CompVersion:0.1.3)
the feature is :
@invalid_blockchain_config Scenario: Invalid configuration Given fabric-cli context "mychannel" is used When fabric-cli is executed with args "ledgerconfig update --configfile ./fixtures/config/fabric/invalid-blockchainhandler-config.json --noprompt" then the error response should contain "component name must be set to the base path [/sidetree/0.0.1/blockchain]"
focus on the error and feature! the error contains "component name must be set to the base path [/sidetree/0.0.1/blockchain]" but the test interrupt!
@llorllale what kind of scopes need to be configured in git personal access token ?
@bjwswang read:packages
should be enough
Hi, I have a similar problem, when running "make bddtests" I got:
3 scenarios (2 passed, 1 failed) 25 steps (9 passed, 1 failed, 15 skipped) 39.517799215s
Randomized with seed: 1636016261258709224 testing: warning: no tests to run PASS coverage: 8.8% of statements FAIL github.com/trustbloc/sidetree-fabric/test/bddtests 39.540s FAIL make: *** [Makefile:99: bddtests] Error 1_
Do you know if it continues to work or is deprecated?
While i follow the Readme.md step by step:
3 scenarios (2 passed, 1 failed) 23 steps (17 passed, 1 failed, 5 skipped) 1m10.420150656s
Randomized with seed: 1594627339517076000 testing: warning: no tests to run
and when i running
DISABLE_COMPOSITION=true go test
,and on the other terminal rundocker logs -f peer1.org2.example.com
, i find a error of:and the log txt with context is:
what should i do or wether the readme.md is the latest? ps: i cannot download the image of
docker.pkg.github.com/trustbloc/sidetree-fabric/peer:latest
,and the image of i use is execmake fabric-peer-docker