Skip to content

Commit 87439ea

Browse files
authored
sanitizing fixtures (#538)
1 parent f166457 commit 87439ea

File tree

64 files changed

+4799
-4795
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4799
-4795
lines changed

test/integration/fixtures/Example.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ interactions:
6565
response:
6666
body: '{"data": [{"id": 59542994, "label": "go-test-ins-3812seykyn76", "group":
6767
"", "status": "running", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05",
68-
"type": "g6-nanode-1", "ipv4": ["194.195.118.209"], "ipv6": "2400:8904::f03c:94ff:fe49:51ac/128",
68+
"type": "g6-nanode-1", "ipv4": ["194.195.118.209"], "ipv6": "1234::5678/128",
6969
"image": "linode/debian9", "region": "ap-west", "specs": {"disk": 25600, "memory":
7070
1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu": 90, "network_in":
7171
10, "network_out": 10, "transfer_quota": 80, "io": 10000}, "backups": {"enabled":
@@ -75,7 +75,7 @@ interactions:
7575
false, "placement_group": null}, {"id": 59543048, "label": "go-test-ins-wo-disk-v6p8qg0b815q",
7676
"group": "", "status": "offline", "created": "2018-01-02T03:04:05", "updated":
7777
"2018-01-02T03:04:05", "type": "g6-nanode-1", "ipv4": ["194.195.118.254"], "ipv6":
78-
"2400:8904::f03c:94ff:fe49:e47f/128", "image": null, "region": "ap-west", "specs":
78+
"1234::5678/128", "image": null, "region": "ap-west", "specs":
7979
{"disk": 25600, "memory": 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts":
8080
{"cpu": 90, "network_in": 10, "network_out": 10, "transfer_quota": 80, "io":
8181
10000}, "backups": {"enabled": true, "available": true, "schedule": {"day":
@@ -84,7 +84,7 @@ interactions:
8484
"has_user_data": false, "placement_group": null}, {"id": 59544188, "label":
8585
"go-test-ins-wo-disk-k2pw744ul49t", "group": "", "status": "offline", "created":
8686
"2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", "type": "g6-nanode-1",
87-
"ipv4": ["192.46.211.66"], "ipv6": "2400:8904::f03c:94ff:fe49:a401/128", "image":
87+
"ipv4": ["192.46.211.66"], "ipv6": "1234::5678/128", "image":
8888
null, "region": "ap-west", "specs": {"disk": 25600, "memory": 1024, "vcpus":
8989
1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu": 90, "network_in": 10, "network_out":
9090
10, "transfer_quota": 80, "io": 10000}, "backups": {"enabled": true, "available":
@@ -155,7 +155,7 @@ interactions:
155155
response:
156156
body: '{"id": 59542994, "label": "go-test-ins-3812seykyn76", "group": "", "status":
157157
"running", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05",
158-
"type": "g6-nanode-1", "ipv4": ["194.195.118.209"], "ipv6": "2400:8904::f03c:94ff:fe49:51ac/128",
158+
"type": "g6-nanode-1", "ipv4": ["194.195.118.209"], "ipv6": "1234::5678/128",
159159
"image": "linode/debian9", "region": "ap-west", "specs": {"disk": 25600, "memory":
160160
1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu": 90, "network_in":
161161
10, "network_out": 10, "transfer_quota": 80, "io": 10000}, "backups": {"enabled":

test/integration/fixtures/ExampleCreateNodeBalancer.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interactions:
1515
method: POST
1616
response:
1717
body: '{"id": 694136, "label": "balancer694136", "region": "us-southeast", "hostname":
18-
"45-79-245-145.ip.linodeusercontent.com", "ipv4": "45.79.245.145", "ipv6": "2600:3c02:1::2d4f:f591",
18+
"45-79-245-145.ip.linodeusercontent.com", "ipv4": "45.79.245.145", "ipv6": "1234::5678",
1919
"created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", "client_conn_throttle":
2020
20, "tags": [], "transfer": {"in": null, "out": null, "total": null}}'
2121
headers:
@@ -80,7 +80,7 @@ interactions:
8080
method: GET
8181
response:
8282
body: '{"id": 694136, "label": "balancer694136", "region": "us-southeast", "hostname":
83-
"45-79-245-145.ip.linodeusercontent.com", "ipv4": "45.79.245.145", "ipv6": "2600:3c02:1::2d4f:f591",
83+
"45-79-245-145.ip.linodeusercontent.com", "ipv4": "45.79.245.145", "ipv6": "1234::5678",
8484
"created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", "client_conn_throttle":
8585
20, "tags": [], "transfer": {"in": null, "out": null, "total": null}}'
8686
headers:
@@ -147,7 +147,7 @@ interactions:
147147
response:
148148
body: '{"id": 694136, "label": "balancer694136_renamed", "region": "us-southeast",
149149
"hostname": "45-79-245-145.ip.linodeusercontent.com", "ipv4": "45.79.245.145",
150-
"ipv6": "2600:3c02:1::2d4f:f591", "created": "2018-01-02T03:04:05", "updated":
150+
"ipv6": "1234::5678", "created": "2018-01-02T03:04:05", "updated":
151151
"2018-01-02T03:04:05", "client_conn_throttle": 20, "tags": [], "transfer": {"in":
152152
null, "out": null, "total": null}}'
153153
headers:

test/integration/fixtures/ExampleCreateNodeBalancerConfig.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interactions:
1515
method: POST
1616
response:
1717
body: '{"id": 694137, "label": "balancer694137", "region": "us-southeast", "hostname":
18-
"45-79-244-189.ip.linodeusercontent.com", "ipv4": "45.79.244.189", "ipv6": "2600:3c02:1::2d4f:f4bd",
18+
"45-79-244-189.ip.linodeusercontent.com", "ipv4": "45.79.244.189", "ipv6": "1234::5678",
1919
"created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", "client_conn_throttle":
2020
20, "tags": [], "transfer": {"in": null, "out": null, "total": null}}'
2121
headers:

test/integration/fixtures/ExampleCreateNodeBalancerNode.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interactions:
1515
method: POST
1616
response:
1717
body: '{"id": 694138, "label": "balancer694138", "region": "us-southeast", "hostname":
18-
"45-79-245-36.ip.linodeusercontent.com", "ipv4": "45.79.245.36", "ipv6": "2600:3c02:1::2d4f:f524",
18+
"45-79-245-36.ip.linodeusercontent.com", "ipv4": "45.79.245.36", "ipv6": "1234::5678",
1919
"created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", "client_conn_throttle":
2020
20, "tags": [], "transfer": {"in": null, "out": null, "total": null}}'
2121
headers:
@@ -148,7 +148,7 @@ interactions:
148148
response:
149149
body: '{"id": 59541321, "label": "nodebalancer-example-instance", "group": "",
150150
"status": "provisioning", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05",
151-
"type": "g6-nanode-1", "ipv4": ["45.79.253.187"], "ipv6": "2600:3c02::f03c:94ff:fe49:735b/128",
151+
"type": "g6-nanode-1", "ipv4": ["45.79.253.187"], "ipv6": "1234::5678/128",
152152
"image": "linode/debian9", "region": "us-southeast", "specs": {"disk": 25600,
153153
"memory": 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu":
154154
90, "network_in": 10, "network_out": 10, "transfer_quota": 80, "io": 10000},

test/integration/fixtures/ExampleListStackscripts_page1.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ interactions:
274274
1;\n fi\n \n hostnamectl set-hostname $1\n sed -i \"s/ubuntu/$1/g\"
275275
/etc/hosts\n}\n\nfunction ubuntu1604_update {\n\t# Configures Apt, disables
276276
interactive prompt, updates repositories and upgrades system packages.\n\n\t#
277-
Forces Apt to use IPv4\n\techo ''Acquire::ForceIPv4 \"true\";'' > /etc/apt/apt.conf.d/99force-ipv4\n\t#
277+
Forces Apt to use IPv4\n\techo ''Acquir1234::5678orceIPv4 \"true\";'' > /etc/apt/apt.conf.d/99force-ipv4\n\t#
278278
Disables interactive prompts\n\texport DEBIAN_FRONTEND=noninteractive\n\t# Updates
279279
Repositories and Upgrades Packages\n\tapt-get update && apt-get upgrade -y\n}\n\nfunction
280280
ubuntu1604_install_additional {\n\t# Install additional system packages\n\t\n\tapt-get
@@ -303,7 +303,7 @@ interactions:
303303
]; then\n echo \"Hostname Not Defined.\"\n return 1;\n fi\n \n hostnamectl
304304
set-hostname $1\n sed -i \"s/debian/$1/g\" /etc/hosts\n}\n\nfunction debian8_update
305305
{\n\t# Configures Apt, disables interactive prompt, updates repositories and
306-
upgrades system packages.\n\n\t# Forces Apt to use IPv4\n\techo ''Acquire::ForceIPv4
306+
upgrades system packages.\n\n\t# Forces Apt to use IPv4\n\techo ''Acquir1234::5678orceIPv4
307307
\"true\";'' > /etc/apt/apt.conf.d/99force-ipv4\n\t# Disables interactive prompts\n\texport
308308
DEBIAN_FRONTEND=noninteractive\n\t# Updates Repositories and Upgrades Packages\n\tapt-get
309309
update && apt-get upgrade -y\n}\n\nfunction debian8_install_additional {\n\t#
@@ -532,7 +532,7 @@ interactions:
532532
LOG --log-prefix \"iptables_INPUT_denied: \" --log-level 7\n\tiptables -A INPUT
533533
-j REJECT\n\tiptables -A FORWARD -m limit --limit 5/min -j LOG --log-prefix
534534
\"iptables_FORWARD_denied: \" --log-level 7\n\tiptables -A FORWARD -j REJECT\n\tip6tables
535-
-A INPUT -i lo -j ACCEPT\n\tip6tables -A INPUT ! -i lo -s ::1/128 -j REJECT\n\tip6tables
535+
-A INPUT -i lo -j ACCEPT\n\tip6tables -A INPUT ! -i lo -s 1234::5678/128 -j REJECT\n\tip6tables
536536
-A INPUT -p icmpv6 -j ACCEPT\n\tip6tables -A INPUT -p tcp --dport 80 -m state
537537
--state NEW -j ACCEPT\n\tip6tables -A INPUT -p tcp --dport 443 -m state --state
538538
NEW -j ACCEPT\n\tip6tables -A INPUT -m state --state ESTABLISHED,RELATED -j
@@ -553,7 +553,7 @@ interactions:
553553
LOG --log-prefix \"iptables_INPUT_denied: \" --log-level 7\n\tiptables -A INPUT
554554
-j REJECT\n\tiptables -A FORWARD -m limit --limit 5/min -j LOG --log-prefix
555555
\"iptables_FORWARD_denied: \" --log-level 7\n\tiptables -A FORWARD -j REJECT\n\tip6tables
556-
-A INPUT -i lo -j ACCEPT\n\tip6tables -A INPUT ! -i lo -s ::1/128 -j REJECT\n\tip6tables
556+
-A INPUT -i lo -j ACCEPT\n\tip6tables -A INPUT ! -i lo -s 1234::5678/128 -j REJECT\n\tip6tables
557557
-A INPUT -p icmpv6 -j ACCEPT\n\tip6tables -A INPUT -p tcp --dport 80 -m state
558558
--state NEW -j ACCEPT\n\tip6tables -A INPUT -p tcp --dport 443 -m state --state
559559
NEW -j ACCEPT\n\tip6tables -A INPUT -m state --state ESTABLISHED,RELATED -j
@@ -577,7 +577,7 @@ interactions:
577577
\" --log-level 7\n\tiptables -A INPUT -j REJECT\n\tiptables -A FORWARD -m limit
578578
--limit 5/min -j LOG --log-prefix \"iptables_FORWARD_denied: \" --log-level
579579
7\n\tiptables -A FORWARD -j REJECT\n\tip6tables -A INPUT -i lo -j ACCEPT\n\tip6tables
580-
-A INPUT ! -i lo -s ::1/128 -j REJECT\n\tip6tables -A INPUT -p icmpv6 -j ACCEPT\n\tip6tables
580+
-A INPUT ! -i lo -s 1234::5678/128 -j REJECT\n\tip6tables -A INPUT -p icmpv6 -j ACCEPT\n\tip6tables
581581
-A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT\n\tip6tables -A INPUT
582582
-p tcp --dport 443 -m state --state NEW -j ACCEPT\n\tip6tables -A INPUT -m state
583583
--state ESTABLISHED,RELATED -j ACCEPT\n\tip6tables -A INPUT -m limit --limit
@@ -2206,7 +2206,7 @@ interactions:
22062206
"2018-01-02T03:04:05", "rev_note": "move apt-get upgrade to end of script to
22072207
prevent busted nf_conntrack kernel modules for UFW - cmullen ", "script": "#!/bin/bash\n#
22082208
Used for Marketplace Apps\n# Helper functions\n\nfunction apt_setup_update {\n #
2209-
Force IPv4 and noninteractive update\n echo ''Acquire::ForceIPv4 \"true\";''
2209+
Force IPv4 and noninteractive update\n echo ''Acquir1234::5678orceIPv4 \"true\";''
22102210
> /etc/apt/apt.conf.d/99force-ipv4\n export DEBIAN_FRONTEND=noninteractive\n apt-get
22112211
update -y\n}\n\nfunction set_hostname {\n IP=`hostname -I | awk ''{print$1}''`\n HOSTNAME=`dnsdomainname
22122212
-A`\n hostnamectl set-hostname $HOSTNAME\n echo $IP $HOSTNAME >> /etc/hosts\n}\n\nfunction
@@ -2232,7 +2232,7 @@ interactions:
22322232
-y\n cd /etc/fail2ban\n cp fail2ban.conf fail2ban.local\n cp jail.conf jail.local\n systemctl
22332233
start fail2ban\n systemctl enable fail2ban\n cd\n}\n\nfunction stackscript_cleanup
22342234
{\n # Force IPv4 and noninteractive upgrade after script runs to prevent breaking
2235-
nf_conntrack for UFW\n echo ''Acquire::ForceIPv4 \"true\";'' > /etc/apt/apt.conf.d/99force-ipv4\n export
2235+
nf_conntrack for UFW\n echo ''Acquir1234::5678orceIPv4 \"true\";'' > /etc/apt/apt.conf.d/99force-ipv4\n export
22362236
DEBIAN_FRONTEND=noninteractive \n apt-get upgrade -y\n\n rm /root/StackScript\n rm
22372237
/root/ssinclude*\n echo \"Installation complete!\"\n}\n\nfunction run_mysql_secure_installation
22382238
{\n # Installs expect, runs mysql_secure_installation and runs mysql secure
@@ -3270,7 +3270,7 @@ interactions:
32703270
"updated": "2018-01-02T03:04:05", "rev_note": "", "script": "#!/usr/bin/bash\n\n##
32713271
REQUIRED IN EVERY MARKETPLACE SUBMISSION\n# Add Logging to /var/log/stackscript.log
32723272
for future troubleshooting\nexec 1> >(tee -a \"/var/log/stackscript.log\") 2>&1\n#
3273-
System Updates updates\napt-get -o Acquire::ForceIPv4=true update -y\n## END
3273+
System Updates updates\napt-get -o Acquir1234::5678orceIPv4=true update -y\n## END
32743274
OF REQUIRED CODE FOR MARKETPLACE SUBMISSION\n\n# Install docker\ncurl -fsSL
32753275
get.docker.com | sudo sh\n\n# Creating Password\necho \"Superinsight setting
32763276
up password....\"\nADMIN_PASSWORD=$(openssl rand -hex 12)\nNODE_IP=$(hostname

test/integration/fixtures/TestAccount_Get.yaml

+15-11
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ interactions:
1414
url: https://api.linode.com/v4beta/account
1515
method: GET
1616
response:
17-
body: '{"company": "Linode", "email": "[email protected]", "first_name": "foo",
18-
"last_name": "bar", "address_1": "123 Street Street", "address_2": "NA",
19-
"city": "Philadelphia", "state": "PA", "zip": "30000", "country": "US", "phone":
20-
"1234567891", "balance": 0.0, "tax_id": "", "billing_source": "linode", "credit_card":
21-
{"last_four": "1234", "expiry": "02/2020"}, "balance_uninvoiced": 0.0, "active_since":
22-
"2018-01-02T03:04:05", "capabilities": ["Linodes", "NodeBalancers", "Block Storage",
23-
"Object Storage", "Kubernetes", "Cloud Firewall", "Vlans", "LKE HA Control Planes",
24-
"Machine Images", "Managed Databases"], "active_promotions": [], "euuid": "FFFFFFFF-2E4D-47CE-FFFFFFFFFFFFFFFFF"}'
17+
body: '{"company": "Akamai", "email": "[email protected]", "first_name": "Youjung",
18+
"last_name": "Kim", "address_1": "", "address_2": "", "city": "", "state": "",
19+
"zip": "", "country": "", "phone": "", "balance": 0.0, "tax_id": "", "billing_source":
20+
"linode", "credit_card": {"last_four": null, "expiry": null}, "balance_uninvoiced":
21+
0.0, "active_since": "2018-01-02T03:04:05", "capabilities": ["Linodes", "NodeBalancers",
22+
"Block Storage", "Object Storage", "Kubernetes", "Cloud Firewall", "Vlans",
23+
"LKE HA Control Planes", "Machine Images", "Managed Databases", "VPCs", "LKE
24+
Network Access Control List (IP ACL)", "Placement Group", "Object Storage Access
25+
Key Regions"], "active_promotions": [], "euuid": "F959AD74-9386-4827-A426975C90B4EBD5"}'
2526
headers:
2627
Access-Control-Allow-Credentials:
2728
- "true"
@@ -38,13 +39,13 @@ interactions:
3839
Connection:
3940
- keep-alive
4041
Content-Length:
41-
- "776"
42+
- "735"
4243
Content-Security-Policy:
4344
- default-src 'none'
4445
Content-Type:
4546
- application/json
4647
Expires:
47-
- Mon, 17 Jun 2024 15:46:56 GMT
48+
- Thu, 27 Jun 2024 20:41:57 GMT
4849
Pragma:
4950
- no-cache
5051
Strict-Transport-Security:
@@ -60,7 +61,10 @@ interactions:
6061
- DENY
6162
- DENY
6263
X-Oauth-Scopes:
63-
- '*'
64+
- account:read_write databases:read_write domains:read_write events:read_write
65+
firewall:read_write images:read_write ips:read_write linodes:read_write lke:read_write
66+
longview:read_write nodebalancers:read_write object_storage:read_write stackscripts:read_write
67+
volumes:read_write vpc:read_write
6468
X-Ratelimit-Limit:
6569
- "400"
6670
X-Xss-Protection:

test/integration/fixtures/TestFirewallRules_Get.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
version: 1
33
interactions:
44
- request:
5-
body: '{"label":"linodego-fw-test","rules":{"inbound":[{"action":"ACCEPT","label":"go-fwrule-test","ports":"22","protocol":"TCP","addresses":{"ipv4":["0.0.0.0/0"],"ipv6":["::0/0"]}}],"inbound_policy":"ACCEPT","outbound":[{"action":"ACCEPT","label":"go-fwrule-test","ports":"22","protocol":"TCP","addresses":{"ipv4":["0.0.0.0/0"],"ipv6":["::0/0"]}}],"outbound_policy":"ACCEPT"},"tags":["testing"],"devices":{}}'
5+
body: '{"label":"linodego-fw-test","rules":{"inbound":[{"action":"ACCEPT","label":"go-fwrule-test","ports":"22","protocol":"TCP","addresses":{"ipv4":["0.0.0.0/0"],"ipv6":["1234::5678/0"]}}],"inbound_policy":"ACCEPT","outbound":[{"action":"ACCEPT","label":"go-fwrule-test","ports":"22","protocol":"TCP","addresses":{"ipv4":["0.0.0.0/0"],"ipv6":["1234::5678/0"]}}],"outbound_policy":"ACCEPT"},"tags":["testing"],"devices":{}}'
66
form: {}
77
headers:
88
Accept:
@@ -17,9 +17,9 @@ interactions:
1717
body: '{"id": 498946, "label": "linodego-fw-test", "created": "2018-01-02T03:04:05",
1818
"updated": "2018-01-02T03:04:05", "status": "enabled", "rules": {"inbound":
1919
[{"action": "ACCEPT", "label": "go-fwrule-test", "ports": "22", "protocol":
20-
"TCP", "addresses": {"ipv4": ["0.0.0.0/0"], "ipv6": ["::/0"]}}], "inbound_policy":
20+
"TCP", "addresses": {"ipv4": ["0.0.0.0/0"], "ipv6": ["1234::5678/0"]}}], "inbound_policy":
2121
"ACCEPT", "outbound": [{"action": "ACCEPT", "label": "go-fwrule-test", "ports":
22-
"22", "protocol": "TCP", "addresses": {"ipv4": ["0.0.0.0/0"], "ipv6": ["::/0"]}}],
22+
"22", "protocol": "TCP", "addresses": {"ipv4": ["0.0.0.0/0"], "ipv6": ["1234::5678/0"]}}],
2323
"outbound_policy": "ACCEPT", "version": 1, "fingerprint": "7bcc0f03"}, "tags":
2424
["testing"], "entities": []}'
2525
headers:
@@ -84,10 +84,10 @@ interactions:
8484
method: GET
8585
response:
8686
body: '{"inbound": [{"action": "ACCEPT", "label": "go-fwrule-test", "ports": "22",
87-
"protocol": "TCP", "addresses": {"ipv4": ["0.0.0.0/0"], "ipv6": ["::/0"]}}],
87+
"protocol": "TCP", "addresses": {"ipv4": ["0.0.0.0/0"], "ipv6": ["1234::5678/0"]}}],
8888
"inbound_policy": "ACCEPT", "outbound": [{"action": "ACCEPT", "label": "go-fwrule-test",
8989
"ports": "22", "protocol": "TCP", "addresses": {"ipv4": ["0.0.0.0/0"], "ipv6":
90-
["::/0"]}}], "outbound_policy": "ACCEPT", "version": 1, "fingerprint": "7bcc0f03"}'
90+
["1234::5678/0"]}}], "outbound_policy": "ACCEPT", "version": 1, "fingerprint": "7bcc0f03"}'
9191
headers:
9292
Access-Control-Allow-Credentials:
9393
- "true"

0 commit comments

Comments
 (0)