packer/command
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
..
enumflag move the various flag packages from helper to command, since command is the only package that uses them. 2020-11-16 14:23:35 -08:00
flag-kv move the various flag packages from helper to command, since command is the only package that uses them. 2020-11-16 14:23:35 -08:00
flag-slice move the various flag packages from helper to command, since command is the only package that uses them. 2020-11-16 14:23:35 -08:00
test-fixtures add with-annotation flag to hcl2_upgrade 2021-02-12 15:18:53 +01:00
build.go HCL2 Parse packer.required_plugins block + packer init (#10304) 2021-02-02 18:05:04 +01:00
build_cancellation_test.go fix tests 2020-05-08 17:46:33 +02:00
build_cleanup_script_test.go fix tests 2020-05-08 17:46:33 +02:00
build_parallel_test.go HCL2 Parse packer.required_plugins block + packer init (#10304) 2021-02-02 18:05:04 +01:00
build_test.go Fix force flag for hcl2 provisioners and post-processors (#10571) 2021-02-05 10:57:14 +01:00
build_timeout_test.go HCL2 Parse packer.required_plugins block + packer init (#10304) 2021-02-02 18:05:04 +01:00
build_windows_test.go Update build_windows_test.go 2020-07-07 12:00:36 +02:00
cli.go add docs 2021-02-12 15:31:13 +01:00
command_test.go remove sdk 2020-12-17 13:29:25 -08:00
config_file_unix.go test: manually-installed-single-component-plugin-works 2021-02-11 16:35:08 +01:00
config_file_windows.go test: manually-installed-single-component-plugin-works 2021-02-11 16:35:08 +01:00
configtype_enumer.go packer console for HCL2 (#9359) 2020-06-05 17:23:54 +02:00
console.go (2) Implement datasources (#10440) 2021-01-20 10:37:16 +01:00
console_test.go console: allow to use console when there are untyped vars (#9864) 2020-09-02 17:19:56 +02:00
core_wrapper.go HCL2 Parse packer.required_plugins block + packer init (#10304) 2021-02-02 18:05:04 +01:00
exec_test.go HCL2 Parse packer.required_plugins block + packer init (#10304) 2021-02-02 18:05:04 +01:00
fix.go remove sdk 2020-12-17 13:29:25 -08:00
fix_test.go remove sdk 2020-12-17 13:29:25 -08:00
fmt.go enable Packer fmt to read from stdin 2021-01-19 15:30:34 -08:00
fmt_test.go remove sdk 2020-12-17 13:29:25 -08:00
hcl2_upgrade.go update help text for hcl2_upgrade (#10624) 2021-02-15 11:03:44 +01:00
hcl2_upgrade_test.go add with-annotation flag to hcl2_upgrade 2021-02-12 15:18:53 +01:00
init.go addrs: remove Plugin.ForDisplay func, the String one does the job 2021-02-15 15:32:42 +01:00
init_test.go Add test case for non-github hostname 2021-02-16 14:03:29 -05:00
inspect.go (2) Implement datasources (#10440) 2021-01-20 10:37:16 +01:00
inspect_test.go HCL2: allow calling env as input var default value (#10240) 2020-11-11 11:27:32 +01:00
meta.go remove sdk 2020-12-17 13:29:25 -08:00
plugin.go Aws Secrets Manager data sources (#10505) 2021-01-22 14:49:45 +01:00
signal.go remove sdk 2020-12-17 13:29:25 -08:00
utils.go build using HCL2 (#8423) 2019-12-17 11:25:56 +01:00
utils_test.go fix tmpdir creation 2021-02-11 15:17:05 +01:00
validate.go (2) Implement datasources (#10440) 2021-01-20 10:37:16 +01:00
validate_test.go HCL2 Parse packer.required_plugins block + packer init (#10304) 2021-02-02 18:05:04 +01:00
version.go packer.io prefix removal, html extension remove for in-code errors 2020-04-07 17:53:22 -04:00
version_test.go command: version tests 2014-10-27 20:58:44 -07:00