summaryrefslogtreecommitdiff
path: root/heatclient/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* Accept sha256 hash for swift tempurlTakashi Kajinami2022-07-181-1/+1
| | | | | | | | | | | Since swiftclient 4.0.1, sha256 is used when generating tempurl signature[1]. This change extends the regex pattern to assert signatues so that it can accept both sha1(old) and sha256(current). [1] https://review.opendev.org/c/openstack/python-swiftclient/+/845157 Change-Id: I1589adbe4501b1c678f197b9c0f67b716c341b2d
* Merge "Remove six"Zuul2022-06-1314-149/+126
|\
| * Remove sixTakashi Kajinami2022-05-0914-149/+126
| | | | | | | | | | | | | | This library no longer supports Python 2, thus usage of six can be removed. Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
* | Encode urls in unit testsPavlo Shchelokovskyy2022-06-132-3/+6
|/ | | | | | | | currently several unit tests are failing when path from where they run contains url-quotable characters like '@', which apparently is possile in e.g. Jenkins. Change-Id: I44eab3f4a384a27f34e4066651baafa6a9489f49
* Use unittest.mock instead of third party mockjacky062020-05-0627-29/+43
| | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I5cf252c1a22977d3c87898e723e5001cc87a0d87
* Update hacking for Python3ussuri-em2.1.0Andreas Jaeger2020-03-312-5/+5
| | | | | | | | | The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: I82c745f5b1236844deec4538be84037a64eebeee
* Merge "Add files-container option for stack create and update"Zuul2020-02-211-0/+12
|\
| * Add files-container option for stack create and updaterabi2018-08-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If files-container option is specified: - All template/env files would be fetched by the heat engine relative to the files_container and no local files other than the root template would be sent to server. - Relative path of environment files would be sent in the environment_files list. Also adds the option to template validate. Change-Id: I1a703ab8798a003365be650886bb78be5af472b7 Story: #1755453 Task: 19319
* | Merge "Allow to set poll interval to OSC stack create"Zuul2020-02-211-0/+18
|\ \
| * | Allow to set poll interval to OSC stack createPavlo Shchelokovskyy2019-09-251-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain scenarios the default poll interval of 5s used by `openstack stack create --wait` command is too short. Setting the poll interval was supported in heat CLI with `heat stack-create --poll N` but is missing in OSC plugin. This patch adds an optional argument `--poll N` (N defaults to 5) to the `openstack stack create` command. Change-Id: Id279d92ea890032f280e453b795ede2818ffbb8c Story: 2004863 Task: 29106
* | | Remove dependency on mox3Zane Bitter2020-02-101-5/+0
| | | | | | | | | | | | Change-Id: Ie6017be8293b36d1aedfb5cce7b76c85a8b95b63
* | | Remove mox usage from test_shellZane Bitter2020-02-101-288/+120
| | | | | | | | | | | | Change-Id: I4e1dbb55dbc01ebf18ca80aa63ae492a1a8f47ae
* | | tests: Convert 'test_resources' to mockStephen Finucane2020-01-301-38/+23
| | | | | | | | | | | | | | | | | | | | | This is the smaller of the two. Change-Id: I2a483698209e7c4ba2da074ffd7b9466f17937e2 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | tests: Pre-mox removal cleanupStephen Finucane2020-01-301-43/+47
|/ / | | | | | | | | | | | | | | Move some stuff around in order to make the later migration easier to parse. Change-Id: I1404a5b23fd1852be9d04661c2a0ba12c4bb78ec Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Fix unit testsZane Bitter2019-06-241-1/+1
| | | | | | | | Change-Id: I44bbafa95d6eeb3550aac5b480391a3fc7ddaef5
* | Set Content-Type header explictly for SessionClientRabi Mishra2019-03-151-2/+6
| | | | | | | | | | | | | | | | | | | | SessionClient is subclassed from keystoneauth LegacyJsonAdapter. LegacyJsonAdapter does not set the Content-Type explicitly and results in decodeing issues in some cases. Change-Id: Idf23022b394607c332490331fc4b216de6ff1313 Story: 2005237 Task: 30027
* | Merge "Replace deprecated "decodestring()" by "decodebytes()""Zuul2018-11-281-8/+8
|\ \
| * | Replace deprecated "decodestring()" by "decodebytes()"Vu Cong Tuan2018-11-021-8/+8
| |/ | | | | | | | | | | | | | | | | | | decodestring() is deprecated alias of decodebytes() https://docs.python.org/3/library/base64.html#base64.decodestring The same has been done for nova: https://review.openstack.org/#/c/610401/ Change-Id: Ie069aaaff1646a70f3717fc6f9c7252949c4e5fd
* | Merge "Load files from adopt file when adopt stack"Zuul2018-11-201-6/+34
|\ \ | |/ |/|
| * Load files from adopt file when adopt stackricolin2018-07-201-6/+34
| | | | | | | | | | | | | | | | | | Add files from adopt file into create fields. This allow us to adopt nested stack which the template defined in files. Story: #1700744 Task: #17263 Change-Id: I2b473791186949d49be59ee790185b3e394c7000
* | Merge "Enable some off-by-default checks"Zuul2018-07-201-2/+1
|\ \
| * | Enable some off-by-default checksblue552017-06-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some of the available checks are disabled by default, like: [H106] Don’t put vim configuration in source files [H203] Use assertIs(Not)None to check for None Change-Id: I815f189258356cb911d1e232b6f53c864e53c602
* | | Use assertRegex instead of assertRegexpMatchesVu Cong Tuan2018-04-111-17/+17
| |/ |/| | | | | | | | | | | In Python3, assertRegexpMatches & assertNotRegexpMatches are deprecated in favor of assertRegex and assertNotRegex Change-Id: Ied56eda65800d72105ef2e2b683c6ce71cda6c4c
* | Merge "Add `--converge` argument for osc stack update"Zuul2017-12-011-0/+10
|\ \
| * | Add `--converge` argument for osc stack updatericolin2017-10-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add `--converge` argument for osc stack update. This flag will be used as the trigger for observe on reality. implements bp get-reality-for-resources depends-on: I151b575b714dcc9a5971a1573c126152ecd7ea93 Change-Id: If35e1b9234cab173b3c46601bbd331aceebcbcb3
* | | Allow cancelling create_in_progress stacks with --no-rollbackrabi2017-11-081-2/+17
| | | | | | | | | | | | | | | Change-Id: Ib107c82f341f4d271859ca7681d65f7ce4c5d0b1 Related-Bug: #1709041
* | | Add --no-rollback option for stack cancelrabi2017-11-082-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new --no-rollback option for stack cancel. Usage: openstack stack cancel --no-rollback <stack_name> Change-Id: I46252823701779e3a3c6867bc470d5532cf9d7a7 Related-Bug: #1709041
* | | Modify error message encountered during stack updatePriyaDuggirala2017-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parameters of an existing stack can be updated with openstack stack update <stack> --existing --parameter <parameter>=<newvalue> Example : openstack stack update stack1 --parameter p1=v1 If the --existing option is skipped, it leads to the below error Need to specify exactly one of --template-file, --template-url or --template-object This error is misleading as the user might think that stack update cannot be performed without specifying a new template. Modify the error message with --existing option. Change-Id: Idce88bde848378e00b1c873245600ba205939668 Closes-Bug: #1723864
* | | Merge "No longer use oslotest.mockpatch"Zuul2017-10-171-2/+1
|\ \ \
| * | | No longer use oslotest.mockpatchThomas Bechtold2017-10-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is deprecated[1] and will be removed soon. [1] I3efb3c64ebce396e756a47d110a74fe8604b6b72 Closes-Bug: #1712017 Change-Id: If6406da4c940686cbda696f760d06d45690912a1
* | | | Don't override sections in deep_updateThomas Herve2017-10-051-0/+45
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | When you comment all the elements in a YAML mapping, you end up with None instead of an empty mapping, which can have bad side effect when handling multiple environemnents. Let's handle that by ignoring the latest None value. Change-Id: I77ffabeb8d4cd2886ef4f41351e42ebe487b5d4b
* | | Support --show-nested in openstack stack update --dry-runRoberto Polli2017-09-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Added --show-nested support in `openstack stack update`. The work is based on `heat stack-update` implementation. Closes-Bug: #1720085 Change-Id: I50c8f5ac9ba4cb7e478af03ff4c1f099270ae226
* | | Merge "Decode content before checking"Jenkins2017-08-091-1/+1
|\ \ \
| * | | Decode content before checkingrabi2017-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Decode before checking for py3 compatibility. Change-Id: Ic62ebc385146ab1406dd64384044d92be8171052 Related-Bug: #1695144
* | | | Fixing read before prompt bugJoe Borg2017-07-261-1/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | Due to Python buffering sys.stdin and sys.stdout, the read can be shown before text prompt. Change-Id: I86d9ec62f7791da276585ce74a48162315effa7b Signed-off-by: Joe Borg <joe@josephb.org>
* | | Merge "Add optional arguments '-y' in CLI:snapshot-delete"Jenkins2017-07-051-1/+63
|\ \ \ | |_|/ |/| |
| * | Add optional arguments '-y' in CLI:snapshot-deletericolin2017-05-171-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no judgement before use the cli: heat snapshot-delete. So I add it. Partial-Bug: #1642490 Depends-On: If7b515dff64a18f56046b890279c2c59b0ab9dc7 Change-Id: I6e82630816e54aa2d98c3653ab43b865f445e881
* | | Merge "Don't encode path separators"1.10.0Jenkins2017-06-053-31/+31
|\ \ \ | |_|/ |/| |
| * | Don't encode path separatorsrabi2017-05-093-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Encoding the path separators results in urls refused by by apache with 404 unless AllowEncodedSlashes is turned on, which is not the default. The existing encoding of path separators seems unnecessary. Change-Id: I3b77aafc6104119503363e5db36b0379964daba5
* | | Merge "Replace mox3 with mock"Jenkins2017-05-271-278/+230
|\ \ \
| * | | Replace mox3 with mockPanFengyun2016-12-201-278/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In heatclient, some unit tests still use mox3, which will make the test speed much slow, so I decide to remove it. The file: heatclient/tests/unit/test_template_utils.py Implements: bp remove-mox3-in-heatclient Change-Id: I1aa556630ff88b4708834549ce9dc31967e0bb32 Co-author-by: PanFengyun <fengyun.pan@easystack.cn>
* | | | Merge "Pass event filters to the server side"Jenkins2017-05-191-3/+9
|\ \ \ \ | |_|_|/ |/| | |
| * | | Pass event filters to the server sideThomas Herve2017-03-281-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This passes event filters to the server side. It only matters for event_time with limit now, but this fixes that case, and the case for resource_type as well. Change-Id: Ide8f0481cf031cc61d4bb43d1d92109d42326e95
* | | | Merge "Add '--yes' for openstack stack snapshot delete"Jenkins2017-05-171-1/+27
|\ \ \ \ | |_|_|/ |/| | |
| * | | Add '--yes' for openstack stack snapshot deletericolin2017-04-261-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add optional arguments '--yes' or '-y' in osc cli `openstack stack snapshot delete`. There is no judgement before use that cli So propose to add it in case that we delete the snapshot unintentionally. Closes-Bug: #1642874 Change-Id: If7b515dff64a18f56046b890279c2c59b0ab9dc7
* | | | Build event stack_name from linksThomas Herve2017-03-281-2/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | When retrieving events from nested stacks, we used to do a query per stack and thus get the stack that way. We changed it to do only one API call, but didn't fix the way the stack name was set. We need to use the event links to retrieve the stack name, instead of the root stack. Closes-Bug: #1676896 Change-Id: I09ab1cc2c6aaab02036b124b1dfa561dd6132083
* | | Merge "Support openstack stack export"Jenkins2017-03-161-0/+36
|\ \ \
| * | | Support openstack stack exporthuangtianhua2017-02-141-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Heat supports exporting data of stack preparing for abandon stack. This change supports 'openstack stack export' in client. Change-Id: I5d3778f307d10174dbb738548282f7495bd9c825
* | | | Merge "Replace mox3 with mock"Jenkins2017-03-141-382/+297
|\ \ \ \
| * | | | Replace mox3 with mockshizhihui2016-11-131-382/+297
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In heatclient, some unit tests still use mox3, which will make the test speed much slow, so I decide to remove it. The modify file: heatclient/tests/unit/test_common_http.py Change-Id: I220fabedb8e9fcc8eeea9d5e98b3ddeed68f8a43 Implements: bp remove-mox3-in-heatclient