Wilken Rivera
728c5a217d
Add test case for non-github hostname
...
Tests results on current branch; install succeeded which was not expected
```
2021/02/16 14:02:24 ui: Installed plugin example.com/sylviamoss/comment v0.2.19 in "/tmp/pkr-test-cfg-dir-6_pkr_config458005728/example.com/sylviamoss/comment/packer-plugin-comment_v0.2.19_x5.0_linux_amd64"
init_test.go:361: InitCommand.Run() = 0, want 1
init_test.go:381: unexpected dir hash after init: string(
- "h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
+ "h1:iVtzkl/nVm2KiLvlz8rH56ME8QEqRxq8+XT2Lo6bzGU=",
)
--- FAIL: TestInitCommand_Run (6.39s)
--- PASS: TestInitCommand_Run/already-installed-no-op (0.01s)
--- PASS: TestInitCommand_Run/already-installed-no-op/-subtest-0 (0.00s)
--- PASS: TestInitCommand_Run/already-installed-upgrade (2.30s)
--- PASS: TestInitCommand_Run/already-installed-upgrade/-subtest-0 (0.06s)
--- PASS: TestInitCommand_Run/release-with-no-binary (0.17s)
--- PASS: TestInitCommand_Run/manually-installed-single-component-plugin-works (1.32s)
--- PASS: TestInitCommand_Run/manually-installed-single-component-plugin-works/-subtest-0 (0.01s)
--- PASS: TestInitCommand_Run/manually-installed-single-component-plugin-old-api-fails (1.42s)
--- PASS: TestInitCommand_Run/manually-installed-single-component-plugin-old-api-fails/-subtest-0 (0.01s)
--- FAIL: TestInitCommand_Run/unsupported-non-github-source-address (1.18s)
```
Tests results after change with change in this branch
```
2021/02/16 14:03:14 [TRACE] getting available versions for the example.com/sylviamoss/comment plugin
2021/02/16 14:03:14 [TRACE] &{%!q(*github.Client=<nil>) "packer-getter-github-1.7.0-dev"} getter could not get release: example.com/sylviamoss/comment doesn't appear to be a valid github.com source address; check source and try again.
2021/02/16 14:03:14 [DEBUG] will try to install: []
2021/02/16 14:03:14 ui error: no release version found for the example.com/sylviamoss/comment plugin matching the constraint(s): "v0.2.19"
--- PASS: TestInitCommand_Run (5.38s)
--- PASS: TestInitCommand_Run/already-installed-no-op (0.01s)
--- PASS: TestInitCommand_Run/already-installed-no-op/-subtest-0 (0.00s)
--- PASS: TestInitCommand_Run/already-installed-upgrade (2.08s)
--- PASS: TestInitCommand_Run/already-installed-upgrade/-subtest-0 (0.07s)
--- PASS: TestInitCommand_Run/release-with-no-binary (0.21s)
--- PASS: TestInitCommand_Run/manually-installed-single-component-plugin-works (1.20s)
--- PASS: TestInitCommand_Run/manually-installed-single-component-plugin-works/-subtest-0 (0.01s)
--- PASS: TestInitCommand_Run/manually-installed-single-component-plugin-old-api-fails (1.88s)
--- PASS: TestInitCommand_Run/manually-installed-single-component-plugin-old-api-fails/-subtest-0 (0.01s)
--- PASS: TestInitCommand_Run/unsupported-non-github-source-address (0.00s)
```
2021-02-16 14:03:29 -05:00
Adrien Delorme
7089e0854a
rename setup func to avoid name conflict
2021-02-11 18:00:18 +01:00
Adrien Delorme
40c2b2a153
add manually-installed-single-component-plugin-old-api-fails
2021-02-11 16:55:30 +01:00
Adrien Delorme
3677069010
test: manually-installed-single-component-plugin-works
2021-02-11 16:35:08 +01:00
Adrien Delorme
b321c64c1e
Update init_test.go
2021-02-11 15:26:33 +01:00
Adrien Delorme
ad0ce49cec
fix tmpdir creation
2021-02-11 15:17:05 +01:00
Adrien Delorme
021044e963
put name first
2021-02-11 14:56:42 +01:00
Adrien Delorme
3052e3c5d5
tests
2021-02-11 14:46:53 +01:00
Adrien Delorme
ffbb110167
Test running plugins with fake and fresh plugins ( #10595 )
...
* show error as to why plugin discovery failed
* allow to run more manual tests after a plugin installation
* test that a freshly installed external plugin can run
2021-02-09 17:07:59 +01:00
Adrien Delorme
692433721d
Add some acceptance testing for Packer init commands ( #10566 )
2021-02-05 14:06:28 +01:00