Skip to content

Commit 8cd1a16

Browse files
authored
Add integration tests for Configurable DB Params (#728)
* Add database engine config test cases * remove prints * lint * removing invalid fields * add negative test case * address assertion failures * add fixtures * remove invalid fields in assertions
1 parent 6fe99da commit 8cd1a16

7 files changed

Lines changed: 11058 additions & 0 deletions

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ BIN_DIR := $(GOPATH)/bin
44
INTEGRATION_DIR := ./test/integration
55
FIXTURES_DIR := $(INTEGRATION_DIR)/fixtures
66

7+
TEST_TAGS := integration
78
TEST_TIMEOUT := 5h
89

910
SKIP_DOCKER ?= 0
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: ""
6+
form: {}
7+
headers:
8+
Accept:
9+
- application/json
10+
Content-Type:
11+
- application/json
12+
User-Agent:
13+
- linodego/dev https://github.com/linode/linodego
14+
url: https://api.linode.com/v4beta/databases/mysql/config
15+
method: GET
16+
response:
17+
body: '{"binlog_retention_period": {"description": "The minimum amount of time
18+
in seconds to keep binlog entries before deletion. This may be extended for
19+
services that require binlog entries for longer than the default for example
20+
if using the MySQL Debezium Kafka connector.", "example": 600, "maximum": 86400,
21+
"minimum": 600, "requires_restart": false, "type": "integer"}, "mysql": {"connect_timeout":
22+
{"description": "The number of seconds that the mysqld server waits for a connect
23+
packet before responding with Bad handshake", "example": 10, "maximum": 3600,
24+
"minimum": 2, "requires_restart": false, "type": "integer"}, "default_time_zone":
25+
{"description": "Default server time zone as an offset from UTC (from -12:00
26+
to +12:00), a time zone name, or ''SYSTEM'' to use the MySQL server default.",
27+
"example": "+03:00", "maxLength": 100, "minLength": 2, "pattern": "^([-+][\\d:]*|[\\w/]*)$",
28+
"requires_restart": false, "type": "string"}, "group_concat_max_len": {"description":
29+
"The maximum permitted result length in bytes for the GROUP_CONCAT() function.",
30+
"example": 1024, "maximum": 18446744073709551615, "minimum": 4, "requires_restart":
31+
false, "type": "integer"}, "information_schema_stats_expiry": {"description":
32+
"The time, in seconds, before cached statistics expire", "example": 86400, "maximum":
33+
31536000, "minimum": 900, "requires_restart": false, "type": "integer"}, "innodb_change_buffer_max_size":
34+
{"description": "Maximum size for the InnoDB change buffer, as a percentage
35+
of the total size of the buffer pool. Default is 25", "example": 30, "maximum":
36+
50, "minimum": 0, "requires_restart": false, "type": "integer"}, "innodb_flush_neighbors":
37+
{"description": "Specifies whether flushing a page from the InnoDB buffer pool
38+
also flushes other dirty pages in the same extent (default is 1): 0 - dirty
39+
pages in the same extent are not flushed, 1 - flush contiguous dirty pages in
40+
the same extent, 2 - flush dirty pages in the same extent", "example": 0, "maximum":
41+
2, "minimum": 0, "requires_restart": false, "type": "integer"}, "innodb_ft_min_token_size":
42+
{"description": "Minimum length of words that are stored in an InnoDB FULLTEXT
43+
index. Changing this parameter will lead to a restart of the MySQL service.",
44+
"example": 3, "maximum": 16, "minimum": 0, "requires_restart": true, "type":
45+
"integer"}, "innodb_ft_server_stopword_table": {"description": "This option
46+
is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB
47+
tables.", "example": "db_name/table_name", "maxLength": 1024, "pattern": "^.+/.+$",
48+
"requires_restart": false, "type": ["null", "string"]}, "innodb_lock_wait_timeout":
49+
{"description": "The length of time in seconds an InnoDB transaction waits for
50+
a row lock before giving up. Default is 120.", "example": 50, "maximum": 3600,
51+
"minimum": 1, "requires_restart": false, "type": "integer"}, "innodb_log_buffer_size":
52+
{"description": "The size in bytes of the buffer that InnoDB uses to write to
53+
the log files on disk.", "example": 16777216, "maximum": 4294967295, "minimum":
54+
1048576, "requires_restart": false, "type": "integer"}, "innodb_online_alter_log_max_size":
55+
{"description": "The upper limit in bytes on the size of the temporary log files
56+
used during online DDL operations for InnoDB tables.", "example": 134217728,
57+
"maximum": 1099511627776, "minimum": 65536, "requires_restart": false, "type":
58+
"integer"}, "innodb_read_io_threads": {"description": "The number of I/O threads
59+
for read operations in InnoDB. Default is 4. Changing this parameter will lead
60+
to a restart of the MySQL service.", "example": 10, "maximum": 64, "minimum":
61+
1, "requires_restart": true, "type": "integer"}, "innodb_rollback_on_timeout":
62+
{"description": "When enabled a transaction timeout causes InnoDB to abort and
63+
roll back the entire transaction. Changing this parameter will lead to a restart
64+
of the MySQL service.", "example": true, "requires_restart": true, "type": "boolean"},
65+
"innodb_thread_concurrency": {"description": "Defines the maximum number of
66+
threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no
67+
limit)", "example": 10, "maximum": 1000, "minimum": 0, "requires_restart": false,
68+
"type": "integer"}, "innodb_write_io_threads": {"description": "The number of
69+
I/O threads for write operations in InnoDB. Default is 4. Changing this parameter
70+
will lead to a restart of the MySQL service.", "example": 10, "maximum": 64,
71+
"minimum": 1, "requires_restart": true, "type": "integer"}, "interactive_timeout":
72+
{"description": "The number of seconds the server waits for activity on an interactive
73+
connection before closing it.", "example": 3600, "maximum": 604800, "minimum":
74+
30, "requires_restart": false, "type": "integer"}, "internal_tmp_mem_storage_engine":
75+
{"description": "The storage engine for in-memory internal temporary tables.",
76+
"enum": ["TempTable", "MEMORY"], "example": "TempTable", "requires_restart":
77+
false, "type": "string"}, "max_allowed_packet": {"description": "Size of the
78+
largest message in bytes that can be received by the server. Default is 67108864
79+
(64M)", "example": 67108864, "maximum": 1073741824, "minimum": 102400, "requires_restart":
80+
false, "type": "integer"}, "max_heap_table_size": {"description": "Limits the
81+
size of internal in-memory tables. Also set tmp_table_size. Default is 16777216
82+
(16M)", "example": 16777216, "maximum": 1073741824, "minimum": 1048576, "requires_restart":
83+
false, "type": "integer"}, "net_buffer_length": {"description": "Start sizes
84+
of connection buffer and result buffer. Default is 16384 (16K). Changing this
85+
parameter will lead to a restart of the MySQL service.", "example": 16384, "maximum":
86+
1048576, "minimum": 1024, "requires_restart": true, "type": "integer"}, "net_read_timeout":
87+
{"description": "The number of seconds to wait for more data from a connection
88+
before aborting the read.", "example": 30, "maximum": 3600, "minimum": 1, "requires_restart":
89+
false, "type": "integer"}, "net_write_timeout": {"description": "The number
90+
of seconds to wait for a block to be written to a connection before aborting
91+
the write.", "example": 30, "maximum": 3600, "minimum": 1, "requires_restart":
92+
false, "type": "integer"}, "sort_buffer_size": {"description": "Sort buffer
93+
size in bytes for ORDER BY optimization. Default is 262144 (256K)", "example":
94+
262144, "maximum": 1073741824, "minimum": 32768, "requires_restart": false,
95+
"type": "integer"}, "sql_mode": {"description": "Global SQL mode. Set to empty
96+
to use MySQL server defaults. When creating a new service and not setting this
97+
field Akamai default SQL mode (strict, SQL standard compliant) will be assigned.",
98+
"example": "ANSI,TRADITIONAL", "maxLength": 1024, "pattern": "^[A-Z_]*(,[A-Z_]+)*$",
99+
"requires_restart": false, "type": "string"}, "sql_require_primary_key": {"description":
100+
"Require primary key to be defined for new tables or old tables modified with
101+
ALTER TABLE and fail if missing. It is recommended to always have primary keys
102+
because various functionality may break if any large table is missing them.",
103+
"example": true, "requires_restart": false, "type": "boolean"}, "tmp_table_size":
104+
{"description": "Limits the size of internal in-memory tables. Also set max_heap_table_size.
105+
Default is 16777216 (16M)", "example": 16777216, "maximum": 1073741824, "minimum":
106+
1048576, "requires_restart": false, "type": "integer"}, "wait_timeout": {"description":
107+
"The number of seconds the server waits for activity on a noninteractive connection
108+
before closing it.", "example": 28800, "maximum": 2147483, "minimum": 1, "requires_restart":
109+
false, "type": "integer"}}}'
110+
headers:
111+
Access-Control-Allow-Credentials:
112+
- "true"
113+
Access-Control-Allow-Headers:
114+
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
115+
Access-Control-Allow-Methods:
116+
- HEAD, GET, OPTIONS, POST, PUT, DELETE
117+
Access-Control-Allow-Origin:
118+
- '*'
119+
Access-Control-Expose-Headers:
120+
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
121+
Cache-Control:
122+
- private, max-age=0, s-maxage=0, no-cache, no-store
123+
- private, max-age=60, s-maxage=60
124+
Connection:
125+
- keep-alive
126+
Content-Length:
127+
- "7548"
128+
Content-Security-Policy:
129+
- default-src 'none'
130+
Content-Type:
131+
- application/json
132+
Server:
133+
- nginx/1.22.1
134+
Strict-Transport-Security:
135+
- max-age=31536000
136+
- max-age=31536000
137+
Vary:
138+
- Authorization, X-Filter
139+
- Authorization, X-Filter
140+
X-Accepted-Oauth-Scopes:
141+
- '*'
142+
X-Content-Type-Options:
143+
- nosniff
144+
X-Frame-Options:
145+
- DENY
146+
- DENY
147+
X-Oauth-Scopes:
148+
- '*'
149+
X-Ratelimit-Limit:
150+
- "400"
151+
X-Xss-Protection:
152+
- 1; mode=block
153+
status: 200 OK
154+
code: 200
155+
duration: ""

0 commit comments

Comments
 (0)