-
Notifications
You must be signed in to change notification settings - Fork 157
java functional tests - code and tests #1511
Conversation
e0dc0f2
to
61f2ac5
Compare
ddbdabd
to
08d6d14
Compare
const capsChaincodeLabelForJava: string = chaincodeLabel[0].toUpperCase() + chaincodeLabel.slice(1).replace(/\./g, '').replace('@', '_'); | ||
if (contractName !== '') { | ||
const capsContractName: string = contractName[0].toUpperCase() + contractName.slice(1); | ||
testFile = path.join(functionalTestsDirectory, `${capsContractName}${capsChaincodeLabelForJava}Test.${testFileSuffix}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth putting a '_' between the contract and chaincode name.
} | ||
|
||
async function mvOrRmBuildFileCopy(packageFolder: vscode.WorkspaceFolder, remove: boolean): Promise<void> { | ||
const gradleFileTmp: string = `${packageFolder.uri.fsPath}/build.gradle.tmp`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably do path.join(packageFolder.uri.fsPath, 'build.gradle.tmp')
to prevent any OS file-system errors.
(Same for line 638 - mavenFileTmp)
08d6d14
to
17c88ae
Compare
91dda76
to
fac1840
Compare
a348914
to
a2c939e
Compare
2c5a6ba
to
3773ef4
Compare
README.md
Outdated
Connect by clicking on a gateway in the `Fabric Gateways` panel, and expand the navigation tree to explore its resources. Instantiated Smart Contracts are listed under the channel and from here you can generate functional-level test files on single or multiple smart contracts (Currently you cannot generate Java functional tests). Submit or evaluate individual transactions listed under the instantiated smart contracts, with the result displayed in the `Blockchain` output channel. | ||
Connect by clicking on a gateway in the `Fabric Gateways` panel, and expand the navigation tree to explore its resources. Instantiated Smart Contracts are listed under the channel and from here you can generate functional-level test files on single or multiple smart contracts. Submit or evaluate individual transactions listed under the instantiated smart contracts, with the result displayed in the `Blockchain` output channel. | ||
|
||
#### _<font color='red'>* Beta * </font> Java functional tests_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear red unfortunately - https://github.com/lquintai/blockchain-vscode-extension/tree/javaFunctTests#-beta---java-functional-tests
I think it's fine if BETA is in bold using: **BETA**
##### Gradle Project - modify build.gradle: | ||
|
||
``` | ||
Add the following repository: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we tidy up this formatting with:
Gradle Project - modify build.gradle:
Add the following repository:
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
Add the following dependencies:
testImplementation 'org.hyperledger.fabric:fabric-gateway-java:1.4.1-SNAPSHOT'
testImplementation 'org.assertj:assertj-core:3.14.0'
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.10.0'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.10.0'
Maven Project - modify pom.xml:
Add the following repository:
<repository>
<id>nexus</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
Add the following dependencies:
<dependency>
<groupId>org.hyperledger.fabric</groupId>
<artifactId>fabric-gateway-java</artifactId>
<version>1.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.14.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.0</version>
</dependency>
Signed-off-by: Leonor Quintais <[email protected]>
3773ef4
to
903f4d1
Compare
Signed-off-by: Leonor Quintais <[email protected]>
* Changed local wallet name displayed when trying to delete identity (closes #1509). (#1534) Signed-off-by: Leonor Quintais <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Transaction peer targeting (close #1514) (#1530) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Ignore non-JSON files and search subdirectories (resolves #1523) (#1541) Signed-off-by: Simon Stone <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Fixed disconnect env on all panels (close #1549) (#1551) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Fix associating identities with nodes (#1548) Pass in a wallet registry entry rather than a wallet contributes to #1517 Signed-off-by: Caroline Fletcher <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Bump Fabric Node.js SDK levels (resolves #1554) Signed-off-by: Simon Stone <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * try to run npm audit until it passes (#1536) Signed-off-by: Leonor Quintais <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Fix insiders unit tests (#1559) Update electron and modules versions Signed-off-by: Caroline Fletcher <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Update gateway registries (#1537) Update gateway registries to use new file based registry contributes to #1517 Signed-off-by: Caroline Fletcher <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Update add environment tutorial (#1560) Update now that the ca doesn't include the enroll id and secret closes #1550 Signed-off-by: Caroline Fletcher <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Update environment registries (#1562) Update to make environment registries use the file based registry contributes to #1517 Signed-off-by: Caroline Fletcher <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Build - npm steps as script (#1561) Signed-off-by: Leonor Quintais <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Add in being able to show the stack trace (#1563) Added param to output log to show the stack trace closes #1553 Signed-off-by: Caroline Fletcher <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Show MSPID when peer targeting (#1566) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Disable npm audit (#1571) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Updated exported connection profile (#1573) Removed wallet property as it's not a valid property of a connection profile and is just used internally closes #1459 Signed-off-by: Caroline Fletcher <[email protected]> * Update repositories (#1565) Make repositories use the file based registry closes #1517 Signed-off-by: Caroline Fletcher <[email protected]> * Fix insiders unit tests (#1579) Fixed tests on insiders build Signed-off-by: Caroline Fletcher <[email protected]> * Fix telemetry (#1580) Add back in step to set production flag Signed-off-by: Caroline Fletcher <[email protected]> * Added tree item for empty panels (close #1564) (#1568) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Fix adding identity to local wallet (#1581) Updated to get the mspid's from the node files closes #1465 Signed-off-by: Caroline Fletcher <[email protected]> * Updated audit dependency (#1582) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * No longer allows user to delete local_fabric_wallet from command pallette (#1583) Signed-off-by: Akshat Shah <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Changelog (#1585) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Version bump and build (#1587) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Fix publishing (#1588) Update to use existing package Signed-off-by: Caroline Fletcher <[email protected]> * Version bump (#1590) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Enabling reading in and switching between smart contracts (#1570) Signed-off-by: Erin Hughes <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Build - continue on stderr (#1572) Signed-off-by: Leonor Quintais <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Associate multiple nodes \n Added functionality and tests to associate multiple nodes at once using checkbox (#1552) Signed-off-by: Akshat Shah <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Updating dependencies to devdependencies (#1594) Signed-off-by: Erin Hughes <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Updated mispelt override (#1598) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Created skeleton screen for creating a new transaction (#1592) Signed-off-by: Erin Hughes <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Added tutorials for identities on local fabric ca (#1325) Signed-off-by: Akshat Shah <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Temp fix for No path for wallet has been provided (close #1593) (#1597) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Audit fix (#1610) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * java functional tests - code and tests (#1511) Signed-off-by: Leonor Quintais <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Updated Java test runner dependency (#1611) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Changelog (#1613) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Version bump (#1616) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Generation of transaction template based on user selection (#1608) Signed-off-by: Erin Hughes <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Add fabric performance report link to HomeView (#1625) Signed-off-by: [email protected] <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * update perf link to match new target (#1632) Signed-off-by: [email protected] <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Resolve 2 vulnerabilities with npm audit fix (#1650) Signed-off-by: Leonor Quintais <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Build Docker image using code-server (contributes to #1494) (#1637) Signed-off-by: Simon Stone <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Return and show error when no open packages to chose from (Closes #1567) (#1635) Signed-off-by: Leonor-Maria Quintais <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Fix azure version bump (#1638) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Add instructions for building Docker image (contributes to #1494) Signed-off-by: Simon Stone <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Update fabric version in cucumber tests (#1659) Updated to 1.4.4 Signed-off-by: Caroline Fletcher <[email protected]> * Audit fix (#1665) Signed-off-by: Jake Turner <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Added functionality to allow API keys & url to be stored along with relevant tests (#1618) Signed-off-by: Akshat Shah <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Add Kubernetes configuration and instructions (contributes to #1494) Signed-off-by: Simon Stone <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Make mono repo lerna (#1652) * Create a mono repo Moved all the files Signed-off-by: Caroline Fletcher <[email protected]> * Create a mono-repo Update azure files contributes to #741 Signed-off-by: Caroline Fletcher <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Ask user to select which nodes should be imported from Ops Tool (#1651) Signed-off-by: Leonor Quintais <[email protected]> Signed-off-by: Caroline Fletcher <[email protected]> * Updated branch to master added all commits from master Signed-off-by: Caroline Fletcher <[email protected]>
With this delivery a user can now create java functional tests for a java contract.
The project's build file might need to be updated to allow the import of the required libraries.
Signed-off-by: Leonor Quintais [email protected]