Commit 49f3c70
authored
chore: Adds initial TPF implementation for advanced_cluster (#2813)
* initial create operation
* initial resource implementation
* support returning nil when advanced config fields are null
* test: Add support for overriding http round tripper to allow mocking http request/responses
* minor error renaming
* remove mocked responses
* test: initial TestAdvancedCluster_configSharded requests
* chore: use same admin version as existing cluster
* mock: allow re-reading GETs
* test: support raising error when mock variables are not set
* fix: don't dump GroupID in cluster payloads
* test: update test case to match existing
* refactor: use full request.id() to keep aligned with generator format (differentiate requests with the distinct payloads)
* fix: add `computed` to adv_cluster attributes to avoid provider errors
* test: minor mock fixes
* feat: support state transitions and pause logic
* chore: test data updates
* test: Support overriding diff files by using `_manual` suffix
* style: fmt
* test: delete old mock files
* test: rename basic to replicast
* fix: Deleted should support IDLE --> DELETED
* fix: cluster name update requires replace
* test: Add tenant test case
* chore: include provider changes
* fix(move_state): Use ValueString() and do a proper conversion
* test: Support mocking test case
* refactor: use new `unit.MockTestCase` to simplify resource_test.go
* test: Introduce "live" acceptance test for tpf
* refactor: re-use existing retry strategy states
* refactor: introduce constant.error_codes
* refactor: minor cleanups
* test: Refactor MockTestCase to also run and support setting TF_ACC dynamically
* chore: increase unit test timeout to enable tpf unit tests
* minor improvements
* unit test timeout increase. Used 75s locally
* ci: support running mocked acceptance tests as part of advanced_cluster_tpf job
* ci: as of now, advancedclustertpf unit tests cannot run as part of normal unit test since the resource is not added in provider
* test: Skip broken move_state_tests
* minor fix
* chore: fix imports to latest SDK
* estetic change to workflow file
* refactor: Use provider_mock instead of customizing existing provider (revert all changes to client.go and provider.go
* address PR comments
* use `diags` instead of returning summary, detail
* only removeResource in read
* address immediate PR comments
* refactor: Use a higher abstraction level in update
* refactor: Return TFModel to make purpose more explicit
* refactor: Replace awaitChanges method with AwaitChanges function for improved clarity and consistency
* apply suggestion
* chore: Add step count assertion
* refactor: move out all the unit tests and mocked unit test logic
* remove: accidental provider changes
* remove last changes for unit tests1 parent 213dea1 commit 49f3c70
File tree
36 files changed
+444
-1781
lines changed- internal
- common/retrystrategy
- service/advancedclustertpf
- testdata
- testutil/acc
36 files changed
+444
-1781
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
17 | 14 | | |
18 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
143 | | - | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
244 | | - | |
245 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
246 | 255 | | |
247 | 256 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 257 | + | |
252 | 258 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
| |||
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
| 76 | + | |
65 | 77 | | |
66 | 78 | | |
67 | 79 | | |
| |||
0 commit comments