Skip to content

Commit

Permalink
Rosetta Deployment Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
James Browning committed Feb 3, 2021
1 parent 3f8eb2b commit 4901ab4
Show file tree
Hide file tree
Showing 8 changed files with 211 additions and 0 deletions.
9 changes: 9 additions & 0 deletions deployment-test/README.md
@@ -0,0 +1,9 @@
## Deployment Test

### Description
Automated API checks for Rosetta deployments on testnet, stagning, shelley-qa and mary-qa.

### Steps:
- `npm install newman`
- `nodejs data-deploy-test`

18 changes: 18 additions & 0 deletions deployment-test/data-deployment-test.js
@@ -0,0 +1,18 @@
const newman = require('newman');

const environments = [ 'testnet.postman_environment.json',
'shelley-qa.postman_environment.json',
'mary-qa.postman_environment.json',
'staging.postman_environment.json' ]

for (env of environments) {
newman.run({
collection: 'https://www.getpostman.com/collections/681bc379b01e1bf278a6',
environment: require(`./environments/${env}`),
globals: require('./globals.json'),
reporters: ['cli', 'json']
}, function (err) {
if (err) { throw err; }
console.log('collection run complete!');
});
}
14 changes: 14 additions & 0 deletions deployment-test/data-local-docker-test.js
@@ -0,0 +1,14 @@
const newman = require('newman');

const envFile = require('some_arg');
const port = 8081;

newman.run({
collection: require('./Cardano-Rosetta.postman_collection.json'),
environment: require(endFile),
envVar: [ { "key":"", "value":`localhost:${port}` } ]
reporters: ['cli', 'json']
}, function (err) {
if (err) { throw err; }
console.log('collection run complete!');
});
39 changes: 39 additions & 0 deletions deployment-test/environments/mary-qa.postman_environment.json
@@ -0,0 +1,39 @@
{
"id": "c2d58415-572d-40db-b857-dc92b202200b",
"name": "mary-qa",
"values": [
{
"key": "URL",
"value": "https://explorer.mary-qa.dev.cardano.org/rosetta",
"enabled": true
},
{
"key": "networkId",
"value": "3",
"enabled": true
},
{
"key": "genesisBlockHash",
"value": "5fabaf2188b1b2a0dde0046ad564ca37c5d92e67b6d7e92da72b2bbc35dfed7e",
"enabled": true
},
{
"key": "blockHash",
"value": "6a09bcaeef2338d595b8a94a895a73a95a13598101f4a217d011d0344f747a84",
"enabled": true
},
{
"key": "blockIndex",
"value": "34684",
"enabled": true
},
{
"key": "transactionId",
"value": "1df7715c572294553204c0b8d0c9077b6d5edbf0f8d6a4ad1146a2ff488a8d0d",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2021-02-03T20:27:48.749Z",
"_postman_exported_using": "Postman/7.36.1"
}
39 changes: 39 additions & 0 deletions deployment-test/environments/shelley-qa.postman_environment.json
@@ -0,0 +1,39 @@
{
"id": "39c0c944-d7e4-4ea4-a1cc-9b862ea0f520",
"name": "shelley-qa",
"values": [
{
"key": "URL",
"value": "https://explorer.shelley-qa.dev.cardano.org/rosetta",
"enabled": true
},
{
"key": "networkId",
"value": "3",
"enabled": true
},
{
"key": "genesisBlockHash",
"value": "9325495d3ac7554d4bfaf2392cc3c74676d5add873d6ef8862d7562e660940bf",
"enabled": true
},
{
"key": "blockHash",
"value": "be2aed37b7fffd0c3a472c47deef3dc9f94416634a35a3ce208d15a08341af8a",
"enabled": true
},
{
"key": "blockIndex",
"value": "684048",
"enabled": true
},
{
"key": "transactionId",
"value": "c244afe17beb10797e8432ec9b8749b4b5b6725b4d2959481a9108016051fbd8",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2021-02-03T20:27:54.926Z",
"_postman_exported_using": "Postman/7.36.1"
}
39 changes: 39 additions & 0 deletions deployment-test/environments/staging.postman_environment.json
@@ -0,0 +1,39 @@
{
"id": "e24454f2-84a0-48b6-b605-ba0bff4c31a7",
"name": "staging",
"values": [
{
"key": "URL",
"value": "https://explorer.staging.cardano.org/rosetta",
"enabled": true
},
{
"key": "networkId",
"value": "mainnet",
"enabled": true
},
{
"key": "genesisBlockHash",
"value": "c6a004d3d178f600cd8caa10abbebe1549bef878f0665aea2903472d5abf7323",
"enabled": true
},
{
"key": "blockHash",
"value": "40261190e1bef1966d04a319ed2fdf56d2a729fcd3b1fc1e105bf5975511f5d3",
"enabled": true
},
{
"key": "blockIndex",
"value": "5270210",
"enabled": true
},
{
"key": "transactionId",
"value": "a672bf8b7b42c0da4f77c52719e3e25a89ac1105aa09bfaeaf373bd1f5da48ec",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2021-02-03T20:27:58.252Z",
"_postman_exported_using": "Postman/7.36.1"
}
39 changes: 39 additions & 0 deletions deployment-test/environments/testnet.postman_environment.json
@@ -0,0 +1,39 @@
{
"id": "e118885e-ce04-4de8-9aad-b33467776592",
"name": "testnet",
"values": [
{
"key": "URL",
"value": "https://explorer.cardano-testnet.iohkdev.io/rosetta",
"enabled": true
},
{
"key": "networkId",
"value": "testnet",
"enabled": true
},
{
"key": "genesisBlockHash",
"value": "96fceff972c2c06bd3bb5243c39215333be6d56aaf4823073dca31afe5038471",
"enabled": true
},
{
"key": "blockHash",
"value": "cc747306d0420500b0e3b2a30c5b799f810f57473ae0c3e365aaf36d2e49cd2a",
"enabled": true
},
{
"key": "blockIndex",
"value": "2126713",
"enabled": true
},
{
"key": "transactionId",
"value": "7b507546d1e9aa6080d46183cbc313629156e88a228626da9ac28434688d9e92",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2021-02-03T20:28:01.458Z",
"_postman_exported_using": "Postman/7.36.1"
}
14 changes: 14 additions & 0 deletions deployment-test/globals.json
@@ -0,0 +1,14 @@
{
"id": "f0ff4d5a-b1ce-4a7f-8af1-d9f21f52c1e6",
"values": [
{
"key": "rosettaVersion",
"value": "1.4.4",
"enabled": true
}
],
"name": "Team Workspace Globals",
"_postman_variable_scope": "globals",
"_postman_exported_at": "2021-02-03T19:33:49.979Z",
"_postman_exported_using": "Postman/7.36.1"
}

0 comments on commit 4901ab4

Please sign in to comment.