Skip to content

Commit

Permalink
Merge pull request #26 from roaldnefs/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
roaldnefs authored Jan 5, 2021
2 parents 6e2d75d + fcc980b commit 8409252
Show file tree
Hide file tree
Showing 7 changed files with 568 additions and 71 deletions.
133 changes: 133 additions & 0 deletions tests/fixtures/account.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
[
{
"method": "GET",
"url": "https://api.transip.nl/v6/invoices",
"json": {
"invoices": [
{
"invoiceNumber": "F0000.1911.0000.0004",
"creationDate": "2020-01-01",
"payDate": "2020-01-01",
"dueDate": "2020-02-01",
"invoiceStatus": "waitsforpayment",
"currency": "EUR",
"totalAmount": 1000,
"totalAmountInclVat": 1240
}
]
},
"status": 200,
"content_type": "application/json"
},
{
"method": "GET",
"url": "https://api.transip.nl/v6/invoices/F0000.1911.0000.0004",
"json": {
"invoice": {
"invoiceNumber": "F0000.1911.0000.0004",
"creationDate": "2020-01-01",
"payDate": "2020-01-01",
"dueDate": "2020-02-01",
"invoiceStatus": "waitsforpayment",
"currency": "EUR",
"totalAmount": 1000,
"totalAmountInclVat": 1240
}
},
"status": 200,
"content_type": "application/json"
},
{
"method": "GET",
"url": "https://api.transip.nl/v6/invoices/F0000.1911.0000.0004/invoice-items",
"json": {
"invoiceItems": [
{
"product": "Big Storage Disk 2000 GB",
"description": "Big Storage Disk 2000 GB (example-bigstorage)",
"isRecurring": false,
"date": "2020-01-01",
"quantity": 1,
"price": 1000,
"priceInclVat": 1210,
"vat": 210,
"vatPercentage": 21,
"discounts": [
{
"description": "Korting (20% Black Friday)",
"amount": -500
}
]
}
]
},
"status": 200,
"content_type": "application/json"
},
{
"method": "GET",
"url": "https://api.transip.nl/v6/invoices/F0000.1911.0000.0004/pdf",
"json": {
"pdf": "Y205elpYTWdZWEpsSUhKbFpDd2dabXh2ZDJWeWN5QmhjbVVnWW14MVpTd2dkR2hsY21VZ2MyaHZkV3hrSUdKbElHRWdjR1JtSUdobGNtVWdZblYwSUdsMElHbHpJR2RzZFdVdQ==="
},
"status": 200,
"content_type": "application/json"
},
{
"method": "GET",
"url": "https://api.transip.nl/v6/ssh-keys",
"json": {
"sshKeys": [
{
"id": 123,
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDf2pxWX/yhUBDyk2LPhvRtI0LnVO8PyR5Zt6AHrnhtLGqK+8YG9EMlWbCCWrASR+Q1hFQG example",
"description": "Jim key",
"creationDate": "2020-12-01 15:25:01",
"fingerprint": "bb:22:43:69:2b:0d:3e:16:58:91:27:8a:62:29:97:d1"
}
]
},
"status": 200,
"content_type": "application/json"
},
{
"method": "GET",
"url": "https://api.transip.nl/v6/ssh-keys/123",
"json": {
"sshKey": {
"id": 123,
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDf2pxWX/yhUBDyk2LPhvRtI0LnVO8PyR5Zt6AHrnhtLGqK+8YG9EMlWbCCWrASR+Q1hFQG example",
"description": "Jim key",
"creationDate": "2020-12-01 15:25:01",
"fingerprint": "bb:22:43:69:2b:0d:3e:16:58:91:27:8a:62:29:97:d1"
}
},
"status": 200,
"content_type": "application/json"
},
{
"method": "POST",
"url": "https://api.transip.nl/v6/ssh-keys",
"status": 201,
"content_type": "application/json",
"match_json": {
"sshKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDf2pxWX/yhUBDyk2LPhvRtI0LnVO8PyR5Zt6AHrnhtLGqK+8YG9EMlWbCCWrASR+Q1hFQG example",
"description": "Jim key"
}
},
{
"method": "PUT",
"url": "https://api.transip.nl/v6/ssh-keys/123",
"status": 204,
"content_type": "application/json",
"match_json": {
"description": "Jim key"
}
},
{
"method": "DELETE",
"url": "https://api.transip.nl/v6/ssh-keys/123",
"status": 204,
"content_type": "application/json"
}
]
115 changes: 115 additions & 0 deletions tests/fixtures/colocations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
[
{
"method": "GET",
"url": "https://api.transip.nl/v6/colocations",
"json": {
"colocations": [
{
"name": "example2",
"ipRanges": ["2a01:7c8:c038:6::/64"]
}
]
},
"status": 200,
"content_type": "application/json"
},
{
"method": "GET",
"url": "https://api.transip.nl/v6/colocations/example2",
"json": {
"colocation": {
"name": "example2",
"ipRanges": ["2a01:7c8:c038:6::/64"]
}
},
"status": 200,
"content_type": "application/json"
},
{
"method": "GET",
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses",
"json": {
"ipAddresses": [
{
"address": "37.97.254.6",
"subnetMask": "255.255.255.0",
"gateway": "37.97.254.1",
"dnsResolvers": [
"195.8.195.8",
"195.135.195.135"
],
"reverseDns": "example.com"
}
]
},
"status": 200,
"content_type": "application/json"
},
{
"method": "GET",
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses/37.97.254.6",
"json": {
"ipAddress": {
"address": "37.97.254.6",
"subnetMask": "255.255.255.0",
"gateway": "37.97.254.1",
"dnsResolvers": [
"195.8.195.8",
"195.135.195.135"
],
"reverseDns": "example.com"
}
},
"status": 200,
"content_type": "application/json"
},
{
"method": "POST",
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses",
"status": 201,
"content_type": "application/json",
"match_json": {
"ipAddress": "2a01:7c8:3:1337::6",
"reverseDns": "example.com"
}
},
{
"method": "PUT",
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses/37.97.254.6",
"status": 204,
"content_type": "application/json",
"match_json": {
"ipAddress": {
"address": "37.97.254.6",
"subnetMask": "255.255.255.0",
"gateway": "37.97.254.1",
"dnsResolvers": [
"195.8.195.8",
"195.135.195.135"
],
"reverseDns": "example.com"
}
}
},
{
"method": "DELETE",
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses/37.97.254.6",
"status": 204,
"content_type": "application/json"
},
{
"method": "POST",
"url": "https://api.transip.nl/v6/colocations/example2/remote-hands",
"status": 201,
"content_type": "application/json",
"match_json": {
"remoteHands": {
"coloName": "example2",
"contactName": "Herman Kaakdorst",
"phoneNumber": "+31 612345678",
"expectedDuration": 15,
"instructions": "Reboot server with label Loadbalancer0"
}
}
}
]
Loading

0 comments on commit 8409252

Please sign in to comment.