rename all things 'inexist[e|a]nt' to 'nonexistent' & fix tests (#11325)

+ a typo
pull/11326/head
Adrien Delorme 5 years ago committed by GitHub
parent 28e82b480e
commit 3135714465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -77,7 +77,7 @@ func TestBuild(t *testing.T) {
},
{
name: "var-args: json - inexistent var file errs",
name: "var-args: json - nonexistent var file errs",
args: []string{
"-var-file=" + filepath.Join(testFixture("var-arg"), "potato.json"),
filepath.Join(testFixture("var-arg"), "fruit_builder.json"),
@ -87,7 +87,7 @@ func TestBuild(t *testing.T) {
},
{
name: "var-args: hcl - inexistent json var file errs",
name: "var-args: hcl - nonexistent json var file errs",
args: []string{
"-var-file=" + filepath.Join(testFixture("var-arg"), "potato.json"),
testFixture("var-arg"),
@ -97,7 +97,7 @@ func TestBuild(t *testing.T) {
},
{
name: "var-args: hcl - inexistent hcl var file errs",
name: "var-args: hcl - nonexistent hcl var file errs",
args: []string{
"-var-file=" + filepath.Join(testFixture("var-arg"), "potato.hcl"),
testFixture("var-arg"),

@ -29,7 +29,7 @@ func Test_hcl2_upgrade(t *testing.T) {
{folder: "complete-variables-with-template-engine", flags: []string{}},
{folder: "escaping", flags: []string{}},
{folder: "vsphere_linux_options_and_network_interface", exitCode: 1, flags: []string{}},
{folder: "inexistent", flags: []string{}, exitCode: 1, exitEarly: true},
{folder: "nonexistent", flags: []string{}, exitCode: 1, exitEarly: true},
}
for _, tc := range tc {

@ -1,6 +1,6 @@
build {
provisioner "inexistant" {
provisioner "nonexistent" {
foo = "bar"
}
}

@ -1,4 +1,4 @@
// a source represents a reusable setting for a system boot/start.
source "inexistant" "ubuntu-1204" {
source "nonexistent" "ubuntu-1204" {
foo = "bar"
}
}

@ -1,8 +1,8 @@
// a source represents a reusable setting for a system boot/start.
source "inexistant" "ubuntu-1204" {
source "nonexistent" "ubuntu-1204" {
foo = "bar"
}
build {
sources = ["inexistant.ubuntu-1204"]
sources = ["nonexistent.ubuntu-1204"]
}

@ -66,9 +66,9 @@ func TestParse_build(t *testing.T) {
nil,
false,
},
{"inexistent provisioner",
{"nonexistent provisioner",
defaultParser,
parseTestArgs{"testdata/build/provisioner_inexistent.pkr.hcl", nil, nil},
parseTestArgs{"testdata/build/provisioner_nonexistent.pkr.hcl", nil, nil},
&PackerConfig{
CorePackerVersionString: lockedVersion,
Basedir: filepath.Join("testdata", "build"),
@ -76,7 +76,7 @@ func TestParse_build(t *testing.T) {
&BuildBlock{
ProvisionerBlocks: []*ProvisionerBlock{
{
PType: "inexistant",
PType: "nonexistent",
},
},
},
@ -127,9 +127,9 @@ func TestParse_build(t *testing.T) {
[]packersdk.Build{&packer.CoreBuild{}},
false,
},
{"inexistent post-processor",
{"nonexistent post-processor",
defaultParser,
parseTestArgs{"testdata/build/post-processor_inexistent.pkr.hcl", nil, nil},
parseTestArgs{"testdata/build/post-processor_nonexistent.pkr.hcl", nil, nil},
&PackerConfig{
CorePackerVersionString: lockedVersion,
Basedir: filepath.Join("testdata", "build"),
@ -138,7 +138,7 @@ func TestParse_build(t *testing.T) {
PostProcessorsLists: [][]*PostProcessorBlock{
{
{
PType: "inexistant",
PType: "nonexistent",
},
},
},

@ -101,18 +101,18 @@ func TestParse_datasource(t *testing.T) {
nil,
false,
},
{"inexistent source",
{"nonexistent source",
defaultParser,
parseTestArgs{"testdata/datasources/inexistent.pkr.hcl", nil, nil},
parseTestArgs{"testdata/datasources/nonexistent.pkr.hcl", nil, nil},
&PackerConfig{
CorePackerVersionString: lockedVersion,
Basedir: filepath.Join("testdata", "datasources"),
Datasources: Datasources{
{
Type: "inexistant",
Type: "nonexistent",
Name: "test",
}: {
Type: "inexistant",
Type: "nonexistent",
Name: "test",
},
},

@ -55,12 +55,12 @@ func TestParse_source(t *testing.T) {
},
{"unused source with unknown type fails",
defaultParser,
parseTestArgs{"testdata/sources/inexistent.pkr.hcl", nil, nil},
parseTestArgs{"testdata/sources/nonexistent.pkr.hcl", nil, nil},
&PackerConfig{
CorePackerVersionString: lockedVersion,
Basedir: filepath.Join("testdata", "sources"),
Sources: map[SourceRef]SourceBlock{
{Type: "inexistant", Name: "ubuntu-1204"}: {Type: "inexistant", Name: "ubuntu-1204"},
{Type: "nonexistent", Name: "ubuntu-1204"}: {Type: "nonexistent", Name: "ubuntu-1204"},
},
},
false, false,
@ -69,18 +69,18 @@ func TestParse_source(t *testing.T) {
},
{"used source with unknown type fails",
defaultParser,
parseTestArgs{"testdata/sources/inexistent_used.pkr.hcl", nil, nil},
parseTestArgs{"testdata/sources/nonexistent_used.pkr.hcl", nil, nil},
&PackerConfig{
CorePackerVersionString: lockedVersion,
Basedir: filepath.Join("testdata", "sources"),
Sources: map[SourceRef]SourceBlock{
{Type: "inexistant", Name: "ubuntu-1204"}: {Type: "inexistant", Name: "ubuntu-1204"},
{Type: "nonexistent", Name: "ubuntu-1204"}: {Type: "nonexistent", Name: "ubuntu-1204"},
},
Builds: Builds{
&BuildBlock{
Sources: []SourceUseBlock{
{
SourceRef: SourceRef{Type: "inexistant", Name: "ubuntu-1204"},
SourceRef: SourceRef{Type: "nonexistent", Name: "ubuntu-1204"},
},
},
},

@ -2,7 +2,7 @@
page_title: Unattended Debian/Ubuntu Installation
description: |-
Learn how to use a preseed file to automatically answer installation
questions and enable Packer to connect to your Debian instnace.
questions and enable Packer to connect to your Debian instance.
---
# Unattended Installation for Debian

Loading…
Cancel
Save