Skip to content

Integration test overhaul - #277

Merged
mbwhite merged 2 commits into
hyperledger:mainfrom
mbwhite:integration-test-overhaul
Jan 13, 2023
Merged

mbwhite merged 2 commits into
hyperledger:mainfrom
mbwhite:integration-test-overhaul

Conversation

@mbwhite

@mbwhite mbwhite commented Jan 10, 2023

Copy link
Copy Markdown
Member

PR to resolve issues with the integration tests failing; slightly larger PR than ideal for the scale of the fix. However the original infrastructure used for the integration tests was a derivative of the (very) old byfn test network - and it was using old lifecycle and not updated in any recent time.

Therefore it seemed a manageable risk to remove it entirely and go with the modern solution of pulling in the single docker image of Microfab to use to spin up a real fabric network for testing.

  • additional tests are done with other deployments of Fabric in the fabric-tests repo
  • microfab has all the features needed to support the 'integration/fv' testing of the chaincode, and is in one container

Changes made:

  • Strand up Microfab rather than the multiple images
  • Use a standard two org network as before (one peer per org so simpler than previously)
  • The chaincode is built into a local repo inside each chaincode for testing
  • The same tests are present with the same structure, minor changes made to support a slightly different approach

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
@mbwhite
mbwhite requested a review from a team as a code owner January 10, 2023 12:10
@mbwhite
mbwhite force-pushed the integration-test-overhaul branch 19 times, most recently from 23e6c90 to e0fa388 Compare January 12, 2023 09:37
Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
@mbwhite
mbwhite force-pushed the integration-test-overhaul branch from e0fa388 to bf5ac7a Compare January 12, 2023 09:57
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.5% 0.5% Duplication

@jt-nti jt-nti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor comments and some concern about ccutil but definitely looks like an improvement, and hopefully admin apis may help further in the future

*
*
*/
public class Bash extends Command {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly confused whether this is a generic bash command, as the class name would suggest, or specifically a peer command

Command(List<String> cmd, Map<String,String> additionalEnv){
this.cmd = cmd;
this.env = new HashMap<>();
// this.env = new HashMap(System.getenv());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to leave this commented out? Will not having the system env cause any problems?

Command(List<String> cmd) {
this.cmd = cmd;
this.env = new HashMap();
// this.env = new HashMap(System.getenv());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to leave this commented out? Will not having the system env cause any problems?

@mbwhite
mbwhite merged commit c25ffa5 into hyperledger:main Jan 13, 2023
@mbwhite

mbwhite commented Jan 13, 2023

Copy link
Copy Markdown
Member Author

@mergify backport release-2.5

@mergify

mergify Bot commented Jan 13, 2023

Copy link
Copy Markdown

backport release-2.5

✅ Backports have been created

Details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants