Skip to content

Commit

Permalink
put name first
Browse files Browse the repository at this point in the history
  • Loading branch information
azr committed Feb 11, 2021
1 parent ba8484e commit 021044e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions command/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
)

type testCaseInit struct {
init []func(*testing.T, testCaseInit)
name string
init []func(*testing.T, testCaseInit)
Meta Meta
inPluginFolder map[string]string
expectedPackerConfigDirHashBeforeInit string
Expand Down Expand Up @@ -54,13 +54,13 @@ func TestInitCommand_Run(t *testing.T) {

tests := []testCaseInit{
{
nil,
// here we pre-write plugins with valid checksums, Packer will
// see those as valid installations it did.
// the directory hash before and after init should be the same,
// that's a no-op. This also should do no GH query, so it is best
// to always run it.
"already-installed-no-op",
nil,
testMetaFile(t),
map[string]string{
"github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64": "1",
Expand Down Expand Up @@ -94,13 +94,13 @@ func TestInitCommand_Run(t *testing.T) {
},
},
{
[]func(t *testing.T, tc testCaseInit){
skipInitTestUnlessEnVar(acctest.TestEnvVar).fn,
},
// here we pre-write plugins with valid checksums, Packer will
// see those as valid installations it did.
// But because we require version 0.2.19, we will upgrade.
"already-installed-upgrade",
[]func(t *testing.T, tc testCaseInit){
skipInitTestUnlessEnVar(acctest.TestEnvVar).fn,
},
testMetaFile(t),
map[string]string{
"github.com/sylviamoss/comment/packer-plugin-comment_v0.2.18_x5.0_darwin_amd64": "1",
Expand Down Expand Up @@ -169,10 +169,10 @@ func TestInitCommand_Run(t *testing.T) {
},
},
{
"release-with-no-binary",
[]func(t *testing.T, tc testCaseInit){
skipInitTestUnlessEnVar(acctest.TestEnvVar).fn,
},
"release-with-no-binary",
testMetaFile(t),
nil,
"h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
Expand All @@ -195,10 +195,10 @@ func TestInitCommand_Run(t *testing.T) {
nil,
},
{
"release-with-no-binary",
[]func(t *testing.T, tc testCaseInit){
skipInitTestUnlessEnVar(acctest.TestEnvVar).fn,
},
"release-with-no-binary",
testMetaFile(t),
nil,
"h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
Expand Down

0 comments on commit 021044e

Please sign in to comment.