1
0
mirror of https://github.com/hashicorp/packer.git synced 2026-02-06 15:45:19 +01:00
Commit Graph

11 Commits

Author SHA1 Message Date
Devashish
caed569efb Fix the failing acceptance test 2025-05-06 13:01:49 -07:00
Lucas Bajolet
35d14902b0 datasource/http: change Outputs->ExpectedOutputs
The acceptance tests for the HTTP datasource had a `Outputs` attribute
for checking the output of the command for a specific regexp pattern.
As pointed out, given the expectative nature of the attribute, naming it
`Outputs` did not make the intent clear, so we rename it to
`ExpectedOutputs` with this commit.
2024-11-04 15:15:30 -05:00
Lucas Bajolet
c470395b7a datasource: fix test for invalid method
Since the expected error to look for in the output is compiled to a
regexp, the `[]` from the error message were interpreted as a set of
characters, which made the regexp not match the expected output from the
command.
So to avoid this problem, we escape them so they are expected verbatim
in the command output.
2024-11-04 15:15:30 -05:00
Henrik Gerdes
6c40bfb0cd feat: allow additional methods in http datasource
This adds support for additional http methods for the http datasource.
Fixes #13169

Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2024-10-29 16:27:26 -04:00
Lucas Bajolet
962ccdfc80 packer: address gosimple lint errors 2024-07-18 10:51:17 -04:00
Lucas Bajolet
5d43239654 datasource/http: don't error on 2xx code
When a server returns a code that is not 200, we error in the current
state.

This is not conformant to the HTTP norm, as anything in the 2xx range is
considered a success, so the datasource should not error in this case.

Therefore, this commit fixes the condition in which we report an error,
so that anything in the 2xx range is now considered a success by the
datasource.
2024-05-21 14:26:26 -04:00
guoguangwu
7eb6a45cd4 chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-26 11:13:31 -04:00
hashicorp-copywrite[bot]
19055df3ec [COMPLIANCE] License changes (#12568)
* Updating the license from MPL to Business Source License

Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at https://hashi.co/license-faq, and details of the license at www.hashicorp.com/bsl.

* Update copyright file headers to BUSL-1.1

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-08-10 15:53:29 -07:00
hashicorp-copywrite[bot]
b7df3ca36f [COMPLIANCE] Add Copyright and License Headers (#12254)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-03-02 15:37:05 -05:00
sylviamoss
0cc754a1ad make generate 2022-05-17 20:03:49 +02:00
teddylear
805225a113 feat: add http datasource (#11658) 2022-05-17 19:26:34 +02:00