-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADCM-6125 Use prepared responses for test_config
- Loading branch information
Showing
7 changed files
with
444 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
- type: cluster | ||
name: Cluster With Config Example | ||
version: 1 | ||
description: | | ||
This bundle is designed to provide sample of config, | ||
not nessesary including all config types or combinations. | ||
Don't change configs of existing objects in it, | ||
add new service / component if you need. | ||
- type: service | ||
name: with_json_fields_and_groups | ||
version: 1.0 | ||
|
||
config: | ||
- name: root_int | ||
display_name: Integer At Root | ||
type: integer | ||
default: 100 | ||
- name: root_list | ||
display_name: List At Root | ||
type: list | ||
default: ["first", "second", "third"] | ||
- name: root_dict | ||
display_name: Map At Root | ||
type: map | ||
default: {"k1": "v1", "k2": "v2"} | ||
required: false | ||
- name: duplicate | ||
display_name: Duplicate | ||
type: string | ||
default: "hehe" | ||
- name: root_json | ||
display_name: JSON At Root | ||
type: json | ||
default: {} | ||
- name: main | ||
display_name: Main Section | ||
type: group | ||
subs: | ||
- name: inner_str | ||
display_name: String In Group | ||
type: string | ||
default: "evil" | ||
- name: inner_dict | ||
display_name: Map In Group | ||
type: map | ||
default: {"a": "b"} | ||
- name: inner_json | ||
display_name: JSON In Group | ||
type: json | ||
default: {"complex": [], "jsonfield": 23, "server": "bestever"} | ||
- name: duplicate | ||
display_name: Integer In Group | ||
type: integer | ||
default: 44 | ||
- name: optional_group | ||
display_name: Optional Section | ||
type: group | ||
activatable: true | ||
active: false | ||
subs: | ||
- name: param | ||
display_name: Param In Activatable Group | ||
type: float | ||
default: 44.44 | ||
required: false | ||
- name: root_str | ||
display_name: String At Root | ||
type: string | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This directory have samples of responses from ADCM | ||
to use them as mock responses in unit tests. |
37 changes: 37 additions & 0 deletions
37
tests/unit/files/responses/test_config_example_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"id": 3, | ||
"isCurrent": true, | ||
"creationTime": "2024-11-21T06:38:58.517310Z", | ||
"config": { | ||
"main": { | ||
"duplicate": 44, | ||
"inner_str": "evil", | ||
"inner_dict": { | ||
"a": "b" | ||
}, | ||
"inner_json": "{\"server\": \"bestever\", \"complex\": [], \"jsonfield\": 23}" | ||
}, | ||
"root_int": 100, | ||
"root_str": null, | ||
"duplicate": "hehe", | ||
"root_dict": { | ||
"k1": "v1", | ||
"k2": "v2" | ||
}, | ||
"root_json": "{}", | ||
"root_list": [ | ||
"first", | ||
"second", | ||
"third" | ||
], | ||
"optional_group": { | ||
"param": 44.44 | ||
} | ||
}, | ||
"adcmMeta": { | ||
"/optional_group": { | ||
"isActive": false | ||
} | ||
}, | ||
"description": "init" | ||
} |
Oops, something went wrong.