
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
github.com/smartcontractkit/chainlink-testing-framework/tools/testlistgenerator
This Go script builds a JSON file containing tests to be run for a given product and Ethereum implementation. It reads command line arguments to construct and append entries to a JSON file.
go run main.go -t <test_name> -o <output_file_name> -p <product> -r <test_regex> -f <file> -e <eth_implementation> -d <docker_images> -n <node_label> [-c <chain_ids>] [-w <networks>]
go run main.go -t "emv-test" -o "test_list.json" -p "ocr" -r "TestOCR.*" -f "./smoke/ocr_test.go" -e "besu" -d "hyperledger/besu:21.0.0,hyperledger/besu:22.0.0" -n "ubuntu-latest"
The script generates or updates a JSON file with entries structured as follows:
[
{
"name": "emv-test-01",
"os": "ubuntu-latest",
"product": "ocr",
"eth_implementation": "besu",
"docker_image": "hyperledger/besu:21.0.0",
"run": "-run 'TestOCR.*' ./smoke/ocr_test.go"
},
{
"name": "emv-test-02",
"os": "ubuntu-latest",
"product": "ocr",
"eth_implementation": "besu",
"docker_image": "hyperledger/besu:22.0.0",
"run": "-run 'TestOCR.*' ./smoke/ocr_test.go"
}
]
If the script is run with optional chain_id
flag the output is slightly different:
go run main.go -t "emv-test" -o "test_list.json" -p "ocr" -r "TestOCR.*" -f "./smoke/ocr_test.go" -e "besu" -d "hyperledger/besu:21.0.0,hyperledger/besu:22.0.0" -n "ubuntu-latest" -c 1337,2337 -w "mainnet,ropsten"
Output:
[
{
"name": "emv-test-01",
"os": "ubuntu-latest",
"product": "ocr",
"eth_implementation": "besu",
"docker_image": "1337=hyperledger/besu:21.0.0,2337=hyperledger/besu:21.0.0",
"run": "-run 'TestOCR.*' ./smoke/ocr_test.go",
"networks": "mainnet,ropsten"
},
{
"name": "emv-test-02",
"os": "ubuntu-latest",
"product": "ocr",
"eth_implementation": "besu",
"docker_image": "1337=hyperledger/besu:22.0.0,2337=hyperledger/besu:22.0.0",
"run": "-run 'TestOCR.*' ./smoke/ocr_test.go",
"networks": "mainnet,ropsten"
}
]
-t <test_name>
: A prefix for the test name.-o <output_file_name>
: The name of the JSON file where the test entries will be stored.-p <product>
: The name of the product for which the tests are being generated.-r <test_regex>
: The regular expression to match test names.-f <file>
: The file path where the tests are defined.-e <eth_implementation>
: The name of the Ethereum implementation.-d <docker_images>
: A comma-separated list of Docker images to be used.-n <node_label>
: The node label for the test environment.-c <chain_ids>
: (Optional) A comma-separated list of chain IDs to associate with each Docker image.-w <networks>
: (Optional) A comma-separated list of networks.The script will panic and display error messages in the following scenarios:
OutputEntry
objects and appends them to the output.hyperledger/besu:21.0.0
.chain_ids
and networks
allow for additional customization of the test entries. If chain_ids
are provided, they will be included in the Docker image field. If networks
are provided, they will be included as an additional field in the output JSON.This update reflects the recent changes to include flags for chain_ids
and networks
, and ensures the documentation matches the new argument names and structure.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.