diff --git a/config/config.go b/config/config.go index 188cf4c8e..9c754ad4c 100644 --- a/config/config.go +++ b/config/config.go @@ -17,8 +17,8 @@ package config import ( "github.com/coreos/ignition/config/shared/errors" "github.com/coreos/ignition/config/util" - "github.com/coreos/ignition/config/v3_0_experimental" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/go-semver/semver" @@ -50,7 +50,7 @@ func Parse(raw []byte) (types.Config, report.Report, error) { switch *version { case types.MaxVersion: - return v3_0_experimental.Parse(raw) + return v3_0.Parse(raw) default: return types.Config{}, report.Report{}, errors.ErrUnknownVersion } diff --git a/config/config_test.go b/config/config_test.go index c9a0746a5..17f242ba1 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/coreos/ignition/config/util" - v3_0_experimental "github.com/coreos/ignition/config/v3_0_experimental/types" + v3_0 "github.com/coreos/ignition/config/v3_0/types" ) func testConfigType(t reflect.Type) error { @@ -83,7 +83,7 @@ func testConfigType(t reflect.Type) error { // anything the merge, translation, or validation logic doesn't know how to handle func TestConfigStructure(t *testing.T) { configs := []reflect.Type{ - reflect.TypeOf(v3_0_experimental.Config{}), + reflect.TypeOf(v3_0.Config{}), } for _, configType := range configs { diff --git a/config/merge/merge_test.go b/config/merge/merge_test.go index a1e128847..438d03a7b 100644 --- a/config/merge/merge_test.go +++ b/config/merge/merge_test.go @@ -19,7 +19,7 @@ import ( "testing" "github.com/coreos/ignition/config/util" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/stretchr/testify/assert" ) diff --git a/config/v3_0_experimental/config.go b/config/v3_0/config.go similarity index 95% rename from config/v3_0_experimental/config.go rename to config/v3_0/config.go index 9fff72a0a..78d649494 100644 --- a/config/v3_0_experimental/config.go +++ b/config/v3_0/config.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v3_0_experimental +package v3_0 import ( "reflect" @@ -20,7 +20,7 @@ import ( "github.com/coreos/ignition/config/merge" "github.com/coreos/ignition/config/shared/errors" "github.com/coreos/ignition/config/util" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate" "github.com/coreos/ignition/config/validate/report" diff --git a/config/v3_0_experimental/config_test.go b/config/v3_0/config_test.go similarity index 95% rename from config/v3_0_experimental/config_test.go rename to config/v3_0/config_test.go index bbd212c08..6d3dcf46a 100644 --- a/config/v3_0_experimental/config_test.go +++ b/config/v3_0/config_test.go @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v3_0_experimental +package v3_0 import ( "testing" "github.com/coreos/ignition/config/shared/errors" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/stretchr/testify/assert" ) @@ -81,7 +81,7 @@ func TestParse(t *testing.T) { out: out{err: errors.ErrUnknownVersion}, }, { - in: in{config: []byte(`{"ignition": {"version": "3.0.0-experimental"}}`)}, + in: in{config: []byte(`{"ignition": {"version": "3.0.0"}}`)}, out: out{config: types.Config{Ignition: types.Ignition{Version: types.MaxVersion.String()}}}, }, { diff --git a/config/v3_0_experimental/schema/ignition.json b/config/v3_0/schema/ignition.json similarity index 100% rename from config/v3_0_experimental/schema/ignition.json rename to config/v3_0/schema/ignition.json diff --git a/config/v3_0_experimental/types/ca.go b/config/v3_0/types/ca.go similarity index 100% rename from config/v3_0_experimental/types/ca.go rename to config/v3_0/types/ca.go diff --git a/config/v3_0_experimental/types/config.go b/config/v3_0/types/config.go similarity index 93% rename from config/v3_0_experimental/types/config.go rename to config/v3_0/types/config.go index 8f69506a4..8b6e121f2 100644 --- a/config/v3_0_experimental/types/config.go +++ b/config/v3_0/types/config.go @@ -22,9 +22,8 @@ import ( var ( MaxVersion = semver.Version{ - Major: 3, - Minor: 0, - PreRelease: "experimental", + Major: 3, + Minor: 0, } ) diff --git a/config/v3_0_experimental/types/directory.go b/config/v3_0/types/directory.go similarity index 100% rename from config/v3_0_experimental/types/directory.go rename to config/v3_0/types/directory.go diff --git a/config/v3_0_experimental/types/disk.go b/config/v3_0/types/disk.go similarity index 100% rename from config/v3_0_experimental/types/disk.go rename to config/v3_0/types/disk.go diff --git a/config/v3_0_experimental/types/file.go b/config/v3_0/types/file.go similarity index 100% rename from config/v3_0_experimental/types/file.go rename to config/v3_0/types/file.go diff --git a/config/v3_0_experimental/types/filesystem.go b/config/v3_0/types/filesystem.go similarity index 100% rename from config/v3_0_experimental/types/filesystem.go rename to config/v3_0/types/filesystem.go diff --git a/config/v3_0_experimental/types/filesystem_test.go b/config/v3_0/types/filesystem_test.go similarity index 100% rename from config/v3_0_experimental/types/filesystem_test.go rename to config/v3_0/types/filesystem_test.go diff --git a/config/v3_0_experimental/types/ignition.go b/config/v3_0/types/ignition.go similarity index 100% rename from config/v3_0_experimental/types/ignition.go rename to config/v3_0/types/ignition.go diff --git a/config/v3_0_experimental/types/mode.go b/config/v3_0/types/mode.go similarity index 100% rename from config/v3_0_experimental/types/mode.go rename to config/v3_0/types/mode.go diff --git a/config/v3_0_experimental/types/mode_test.go b/config/v3_0/types/mode_test.go similarity index 100% rename from config/v3_0_experimental/types/mode_test.go rename to config/v3_0/types/mode_test.go diff --git a/config/v3_0_experimental/types/node.go b/config/v3_0/types/node.go similarity index 100% rename from config/v3_0_experimental/types/node.go rename to config/v3_0/types/node.go diff --git a/config/v3_0_experimental/types/node_test.go b/config/v3_0/types/node_test.go similarity index 100% rename from config/v3_0_experimental/types/node_test.go rename to config/v3_0/types/node_test.go diff --git a/config/v3_0_experimental/types/partition.go b/config/v3_0/types/partition.go similarity index 100% rename from config/v3_0_experimental/types/partition.go rename to config/v3_0/types/partition.go diff --git a/config/v3_0_experimental/types/partition_test.go b/config/v3_0/types/partition_test.go similarity index 100% rename from config/v3_0_experimental/types/partition_test.go rename to config/v3_0/types/partition_test.go diff --git a/config/v3_0_experimental/types/passwd.go b/config/v3_0/types/passwd.go similarity index 100% rename from config/v3_0_experimental/types/passwd.go rename to config/v3_0/types/passwd.go diff --git a/config/v3_0_experimental/types/path.go b/config/v3_0/types/path.go similarity index 100% rename from config/v3_0_experimental/types/path.go rename to config/v3_0/types/path.go diff --git a/config/v3_0_experimental/types/path_test.go b/config/v3_0/types/path_test.go similarity index 100% rename from config/v3_0_experimental/types/path_test.go rename to config/v3_0/types/path_test.go diff --git a/config/v3_0_experimental/types/raid.go b/config/v3_0/types/raid.go similarity index 100% rename from config/v3_0_experimental/types/raid.go rename to config/v3_0/types/raid.go diff --git a/config/v3_0_experimental/types/schema.go b/config/v3_0/types/schema.go similarity index 97% rename from config/v3_0_experimental/types/schema.go rename to config/v3_0/types/schema.go index 0bdf777a6..a00a27e9d 100644 --- a/config/v3_0_experimental/types/schema.go +++ b/config/v3_0/types/schema.go @@ -1,6 +1,6 @@ package types -// generated by "schematyper --package=types config/v3_0_experimental/schema/ignition.json -o config/v3_0_experimental/types/schema.go --root-type=Config" -- DO NOT EDIT +// generated by "schematyper --package=types config/v3_0/schema/ignition.json -o config/v3_0/types/schema.go --root-type=Config" -- DO NOT EDIT type CaReference struct { Source string `json:"source"` diff --git a/config/v3_0_experimental/types/storage.go b/config/v3_0/types/storage.go similarity index 100% rename from config/v3_0_experimental/types/storage.go rename to config/v3_0/types/storage.go diff --git a/config/v3_0_experimental/types/unit.go b/config/v3_0/types/unit.go similarity index 100% rename from config/v3_0_experimental/types/unit.go rename to config/v3_0/types/unit.go diff --git a/config/v3_0_experimental/types/unit_test.go b/config/v3_0/types/unit_test.go similarity index 100% rename from config/v3_0_experimental/types/unit_test.go rename to config/v3_0/types/unit_test.go diff --git a/config/v3_0_experimental/types/url.go b/config/v3_0/types/url.go similarity index 100% rename from config/v3_0_experimental/types/url.go rename to config/v3_0/types/url.go diff --git a/config/v3_0_experimental/types/url_test.go b/config/v3_0/types/url_test.go similarity index 100% rename from config/v3_0_experimental/types/url_test.go rename to config/v3_0/types/url_test.go diff --git a/config/v3_0_experimental/types/verification.go b/config/v3_0/types/verification.go similarity index 100% rename from config/v3_0_experimental/types/verification.go rename to config/v3_0/types/verification.go diff --git a/config/v3_0_experimental/types/verification_test.go b/config/v3_0/types/verification_test.go similarity index 100% rename from config/v3_0_experimental/types/verification_test.go rename to config/v3_0/types/verification_test.go diff --git a/config/validate/validate_test.go b/config/validate/validate_test.go index d9fe7e232..65d4ef7e2 100644 --- a/config/validate/validate_test.go +++ b/config/validate/validate_test.go @@ -28,7 +28,7 @@ import ( "github.com/coreos/ignition/config/validate/astjson" "github.com/coreos/ignition/config/validate/report" // Import into the same namespace to keep config definitions clean - . "github.com/coreos/ignition/config/v3_0_experimental/types" + . "github.com/coreos/ignition/config/v3_0/types" ) func TestValidate(t *testing.T) { @@ -61,7 +61,7 @@ func TestValidate(t *testing.T) { out: out{err: errors.ErrUnknownVersion}, }, { - in: in{cfg: Config{Ignition: Ignition{Version: "3.0.0"}}}, + in: in{cfg: Config{Ignition: Ignition{Version: "2.0.0"}}}, out: out{err: errors.ErrUnknownVersion}, }, { @@ -71,7 +71,7 @@ func TestValidate(t *testing.T) { { in: in{cfg: Config{ Ignition: Ignition{ - Version: "3.0.0-experimental", + Version: "3.0.0", Config: IgnitionConfig{ Replace: ConfigReference{ Verification: Verification{ @@ -85,7 +85,7 @@ func TestValidate(t *testing.T) { }, { in: in{cfg: Config{ - Ignition: Ignition{Version: "3.0.0-experimental"}, + Ignition: Ignition{Version: "3.0.0"}, Storage: Storage{ Filesystems: []Filesystem{ { @@ -100,7 +100,7 @@ func TestValidate(t *testing.T) { }, { in: in{cfg: Config{ - Ignition: Ignition{Version: "3.0.0-experimental"}, + Ignition: Ignition{Version: "3.0.0"}, Storage: Storage{ Filesystems: []Filesystem{ { @@ -120,7 +120,7 @@ func TestValidate(t *testing.T) { }, { in: in{cfg: Config{ - Ignition: Ignition{Version: "3.0.0-experimental"}, + Ignition: Ignition{Version: "3.0.0"}, Storage: Storage{ Files: []File{ { @@ -148,7 +148,7 @@ func TestValidate(t *testing.T) { }, { in: in{cfg: Config{ - Ignition: Ignition{Version: "3.0.0-experimental"}, + Ignition: Ignition{Version: "3.0.0"}, Storage: Storage{ Files: []File{ { @@ -174,14 +174,14 @@ func TestValidate(t *testing.T) { }, { in: in{cfg: Config{ - Ignition: Ignition{Version: "3.0.0-experimental"}, + Ignition: Ignition{Version: "3.0.0"}, Systemd: Systemd{Units: []Unit{{Name: "foo.bar", Contents: util.StrToPtr("[Foo]\nfoo=qux")}}}, }}, out: out{err: fmt.Errorf("invalid systemd unit extension")}, }, { in: in{cfg: Config{ - Ignition: Ignition{Version: "3.0.0-experimental"}, + Ignition: Ignition{Version: "3.0.0"}, Systemd: Systemd{Units: []Unit{{Name: "enable-but-no-install.service", Enabled: util.BoolToPtr(true), Contents: util.StrToPtr("[Foo]\nlemon=lime")}}}, }}, out: out{warning: errors.NewNoInstallSectionError("enable-but-no-install.service")}, diff --git a/generate b/generate index dbce9657f..13b5bf9f5 100755 --- a/generate +++ b/generate @@ -12,7 +12,7 @@ hash schematyper 2>/dev/null || { exit 1 } -specs="v3_0_experimental" +specs="v3_0" for spec in $specs do diff --git a/internal/exec/engine.go b/internal/exec/engine.go index 33c6cec4f..c95a22bdd 100644 --- a/internal/exec/engine.go +++ b/internal/exec/engine.go @@ -26,8 +26,8 @@ import ( "time" "github.com/coreos/ignition/config/shared/errors" - config "github.com/coreos/ignition/config/v3_0_experimental" - "github.com/coreos/ignition/config/v3_0_experimental/types" + config "github.com/coreos/ignition/config/v3_0" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/exec/stages" diff --git a/internal/exec/stages/disks/disks.go b/internal/exec/stages/disks/disks.go index d94943ebe..f2425f502 100644 --- a/internal/exec/stages/disks/disks.go +++ b/internal/exec/stages/disks/disks.go @@ -22,7 +22,7 @@ import ( "fmt" "os/exec" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/exec/stages" "github.com/coreos/ignition/internal/exec/util" diff --git a/internal/exec/stages/disks/filesystems.go b/internal/exec/stages/disks/filesystems.go index 5229397bf..2a88aec93 100644 --- a/internal/exec/stages/disks/filesystems.go +++ b/internal/exec/stages/disks/filesystems.go @@ -25,7 +25,7 @@ import ( "runtime" "strings" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/exec/util" ) diff --git a/internal/exec/stages/disks/partitions.go b/internal/exec/stages/disks/partitions.go index c8a40b8e5..d7d407f22 100644 --- a/internal/exec/stages/disks/partitions.go +++ b/internal/exec/stages/disks/partitions.go @@ -26,7 +26,7 @@ import ( "strconv" "strings" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/exec/util" "github.com/coreos/ignition/internal/sgdisk" ) diff --git a/internal/exec/stages/disks/raid.go b/internal/exec/stages/disks/raid.go index 48e2e594e..84df6f799 100644 --- a/internal/exec/stages/disks/raid.go +++ b/internal/exec/stages/disks/raid.go @@ -23,7 +23,7 @@ import ( "fmt" "os/exec" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/exec/util" ) diff --git a/internal/exec/stages/files/files.go b/internal/exec/stages/files/files.go index 7511f8fc2..6d97669e7 100644 --- a/internal/exec/stages/files/files.go +++ b/internal/exec/stages/files/files.go @@ -20,7 +20,7 @@ import ( "os" "strings" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/exec/stages" "github.com/coreos/ignition/internal/exec/util" diff --git a/internal/exec/stages/files/filesystemEntries.go b/internal/exec/stages/files/filesystemEntries.go index ced8a6dbd..b4f24196b 100644 --- a/internal/exec/stages/files/filesystemEntries.go +++ b/internal/exec/stages/files/filesystemEntries.go @@ -22,7 +22,7 @@ import ( "strings" configUtil "github.com/coreos/ignition/config/util" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/exec/util" "github.com/coreos/ignition/internal/log" ) diff --git a/internal/exec/stages/files/passwd.go b/internal/exec/stages/files/passwd.go index 5e4b9d93b..452570b1f 100644 --- a/internal/exec/stages/files/passwd.go +++ b/internal/exec/stages/files/passwd.go @@ -17,7 +17,7 @@ package files import ( "fmt" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" ) // createPasswd creates the users and groups as described in config.Passwd. diff --git a/internal/exec/stages/files/units.go b/internal/exec/stages/files/units.go index cfad76a63..98c079726 100644 --- a/internal/exec/stages/files/units.go +++ b/internal/exec/stages/files/units.go @@ -17,7 +17,7 @@ package files import ( "path/filepath" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/exec/util" ) diff --git a/internal/exec/stages/mount/mount.go b/internal/exec/stages/mount/mount.go index dfed196b5..a50afd529 100644 --- a/internal/exec/stages/mount/mount.go +++ b/internal/exec/stages/mount/mount.go @@ -25,7 +25,7 @@ import ( "sort" "syscall" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/exec/stages" "github.com/coreos/ignition/internal/exec/util" "github.com/coreos/ignition/internal/log" diff --git a/internal/exec/stages/stages.go b/internal/exec/stages/stages.go index de7027c2a..ec102971b 100644 --- a/internal/exec/stages/stages.go +++ b/internal/exec/stages/stages.go @@ -15,7 +15,7 @@ package stages import ( - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/log" "github.com/coreos/ignition/internal/registry" "github.com/coreos/ignition/internal/resource" diff --git a/internal/exec/stages/umount/umount.go b/internal/exec/stages/umount/umount.go index 221b4646a..72d563afc 100644 --- a/internal/exec/stages/umount/umount.go +++ b/internal/exec/stages/umount/umount.go @@ -22,7 +22,7 @@ import ( "sort" "syscall" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/exec/stages" "github.com/coreos/ignition/internal/exec/util" "github.com/coreos/ignition/internal/log" diff --git a/internal/exec/util/blkid.go b/internal/exec/util/blkid.go index 089810a23..67809e6f7 100644 --- a/internal/exec/util/blkid.go +++ b/internal/exec/util/blkid.go @@ -32,7 +32,7 @@ import ( "unsafe" "github.com/coreos/ignition/config/util" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" ) const ( diff --git a/internal/exec/util/file.go b/internal/exec/util/file.go index 638abec1e..7dafcfd76 100644 --- a/internal/exec/util/file.go +++ b/internal/exec/util/file.go @@ -26,7 +26,7 @@ import ( "strconv" "syscall" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/log" "github.com/coreos/ignition/internal/resource" "github.com/coreos/ignition/internal/util" diff --git a/internal/exec/util/passwd.go b/internal/exec/util/passwd.go index b317bb45b..948be9f44 100644 --- a/internal/exec/util/passwd.go +++ b/internal/exec/util/passwd.go @@ -23,7 +23,7 @@ import ( "strings" "syscall" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/as_user" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/log" diff --git a/internal/exec/util/unit.go b/internal/exec/util/unit.go index 4b1f2b829..6aa87de15 100644 --- a/internal/exec/util/unit.go +++ b/internal/exec/util/unit.go @@ -19,7 +19,7 @@ import ( "net/url" "os" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/distro" "github.com/vincent-petithory/dataurl" diff --git a/internal/exec/validate.go b/internal/exec/validate.go index a57be79fa..48f6da674 100644 --- a/internal/exec/validate.go +++ b/internal/exec/validate.go @@ -18,7 +18,7 @@ import ( "io/ioutil" "os" - config "github.com/coreos/ignition/config/v3_0_experimental" + config "github.com/coreos/ignition/config/v3_0" "github.com/coreos/ignition/config/validate/report" ) diff --git a/internal/providers/aws/aws.go b/internal/providers/aws/aws.go index c5611ae0c..e35d5e660 100644 --- a/internal/providers/aws/aws.go +++ b/internal/providers/aws/aws.go @@ -20,7 +20,7 @@ package aws import ( "net/url" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/log" "github.com/coreos/ignition/internal/providers/util" diff --git a/internal/providers/azure/azure.go b/internal/providers/azure/azure.go index 4fc06b721..3054ae8b8 100644 --- a/internal/providers/azure/azure.go +++ b/internal/providers/azure/azure.go @@ -24,7 +24,7 @@ import ( "syscall" "time" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/log" diff --git a/internal/providers/cloudstack/cloudstack.go b/internal/providers/cloudstack/cloudstack.go index d7ddce225..1d0cd2c75 100644 --- a/internal/providers/cloudstack/cloudstack.go +++ b/internal/providers/cloudstack/cloudstack.go @@ -32,7 +32,7 @@ import ( "syscall" "time" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/log" diff --git a/internal/providers/cmdline/cmdline.go b/internal/providers/cmdline/cmdline.go index bce27ce5f..6c731ab71 100644 --- a/internal/providers/cmdline/cmdline.go +++ b/internal/providers/cmdline/cmdline.go @@ -22,7 +22,7 @@ import ( "net/url" "strings" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/log" diff --git a/internal/providers/digitalocean/digitalocean.go b/internal/providers/digitalocean/digitalocean.go index 6c3e8297b..e0b01e30c 100644 --- a/internal/providers/digitalocean/digitalocean.go +++ b/internal/providers/digitalocean/digitalocean.go @@ -20,7 +20,7 @@ package digitalocean import ( "net/url" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/providers/util" "github.com/coreos/ignition/internal/resource" diff --git a/internal/providers/file/file.go b/internal/providers/file/file.go index f6fb9f142..76b2f54f2 100644 --- a/internal/providers/file/file.go +++ b/internal/providers/file/file.go @@ -18,7 +18,7 @@ import ( "io/ioutil" "os" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/providers/util" "github.com/coreos/ignition/internal/resource" diff --git a/internal/providers/gcp/gcp.go b/internal/providers/gcp/gcp.go index aba73309f..26c18c0f8 100644 --- a/internal/providers/gcp/gcp.go +++ b/internal/providers/gcp/gcp.go @@ -20,7 +20,7 @@ package gcp import ( "net/url" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/providers/util" "github.com/coreos/ignition/internal/resource" diff --git a/internal/providers/noop/noop.go b/internal/providers/noop/noop.go index 304958297..6757f4cc8 100644 --- a/internal/providers/noop/noop.go +++ b/internal/providers/noop/noop.go @@ -18,7 +18,7 @@ package noop import ( "github.com/coreos/ignition/config/shared/errors" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/resource" ) diff --git a/internal/providers/openstack/openstack.go b/internal/providers/openstack/openstack.go index 6353a933c..dc7bc5dea 100644 --- a/internal/providers/openstack/openstack.go +++ b/internal/providers/openstack/openstack.go @@ -30,7 +30,7 @@ import ( "syscall" "time" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/log" diff --git a/internal/providers/packet/packet.go b/internal/providers/packet/packet.go index ec89d8b4b..8a1ce9efc 100644 --- a/internal/providers/packet/packet.go +++ b/internal/providers/packet/packet.go @@ -25,7 +25,7 @@ import ( "net/url" "strings" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/providers/util" "github.com/coreos/ignition/internal/resource" diff --git a/internal/providers/providers.go b/internal/providers/providers.go index 8e56faed8..4d5f2728c 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -17,7 +17,7 @@ package providers import ( "errors" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/log" "github.com/coreos/ignition/internal/resource" diff --git a/internal/providers/qemu/qemu.go b/internal/providers/qemu/qemu.go index e15c04dfd..ce9c1f855 100644 --- a/internal/providers/qemu/qemu.go +++ b/internal/providers/qemu/qemu.go @@ -22,7 +22,7 @@ import ( "os" "os/exec" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/providers/util" "github.com/coreos/ignition/internal/resource" diff --git a/internal/providers/system/system.go b/internal/providers/system/system.go index f7990a52d..f45763339 100644 --- a/internal/providers/system/system.go +++ b/internal/providers/system/system.go @@ -19,7 +19,7 @@ import ( "os" "path/filepath" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/log" diff --git a/internal/providers/util/config.go b/internal/providers/util/config.go index 3a8fa64ab..e5fafcd30 100644 --- a/internal/providers/util/config.go +++ b/internal/providers/util/config.go @@ -18,8 +18,8 @@ import ( "crypto/sha512" "encoding/hex" - config "github.com/coreos/ignition/config/v3_0_experimental" - "github.com/coreos/ignition/config/v3_0_experimental/types" + config "github.com/coreos/ignition/config/v3_0" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/log" ) diff --git a/internal/providers/virtualbox/virtualbox.go b/internal/providers/virtualbox/virtualbox.go index e390abe24..c2c3ad1a7 100644 --- a/internal/providers/virtualbox/virtualbox.go +++ b/internal/providers/virtualbox/virtualbox.go @@ -24,7 +24,7 @@ import ( "path/filepath" "github.com/coreos/ignition/config/shared/errors" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/providers/util" diff --git a/internal/providers/vmware/vmware_amd64.go b/internal/providers/vmware/vmware_amd64.go index 7d5bbc82b..0f071680b 100644 --- a/internal/providers/vmware/vmware_amd64.go +++ b/internal/providers/vmware/vmware_amd64.go @@ -18,7 +18,7 @@ package vmware import ( - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/providers" "github.com/coreos/ignition/internal/providers/util" diff --git a/internal/providers/vmware/vmware_unsupported.go b/internal/providers/vmware/vmware_unsupported.go index 61ff6bbf4..6f44f3696 100644 --- a/internal/providers/vmware/vmware_unsupported.go +++ b/internal/providers/vmware/vmware_unsupported.go @@ -22,7 +22,7 @@ package vmware import ( "errors" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/config/validate/report" "github.com/coreos/ignition/internal/resource" ) diff --git a/internal/resource/http.go b/internal/resource/http.go index 7ac780c6a..85cd1ca99 100644 --- a/internal/resource/http.go +++ b/internal/resource/http.go @@ -27,7 +27,7 @@ import ( "net/url" "time" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/earlyrand" "github.com/coreos/ignition/internal/log" "github.com/coreos/ignition/internal/util" diff --git a/internal/sgdisk/sgdisk.go b/internal/sgdisk/sgdisk.go index 0c1b9db3b..3adee343a 100644 --- a/internal/sgdisk/sgdisk.go +++ b/internal/sgdisk/sgdisk.go @@ -19,7 +19,7 @@ import ( "io/ioutil" "os/exec" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/internal/distro" "github.com/coreos/ignition/internal/log" ) diff --git a/internal/util/tools/docs/docs.go b/internal/util/tools/docs/docs.go index ee361684c..22a0fddb5 100644 --- a/internal/util/tools/docs/docs.go +++ b/internal/util/tools/docs/docs.go @@ -26,7 +26,7 @@ import ( "strings" "github.com/coreos/ignition/config/shared/errors" - config "github.com/coreos/ignition/config/v3_0_experimental" + config "github.com/coreos/ignition/config/v3_0" "github.com/coreos/ignition/config/validate/report" ) diff --git a/internal/util/verification.go b/internal/util/verification.go index 40158b258..1ab887e9b 100644 --- a/internal/util/verification.go +++ b/internal/util/verification.go @@ -22,7 +22,7 @@ import ( "hash" "strings" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" ) var ( diff --git a/internal/util/verification_test.go b/internal/util/verification_test.go index 4646a3daf..79cc4a7ee 100644 --- a/internal/util/verification_test.go +++ b/internal/util/verification_test.go @@ -18,7 +18,7 @@ import ( "reflect" "testing" - "github.com/coreos/ignition/config/v3_0_experimental/types" + "github.com/coreos/ignition/config/v3_0/types" ) func TestAssertValid(t *testing.T) { diff --git a/tests/blackbox_test.go b/tests/blackbox_test.go index 524777f07..047d8d29d 100644 --- a/tests/blackbox_test.go +++ b/tests/blackbox_test.go @@ -27,8 +27,9 @@ import ( "testing" "time" - config "github.com/coreos/ignition/config/v3_0_experimental" + config "github.com/coreos/ignition/config/v3_0" "github.com/coreos/ignition/tests/register" + "github.com/coreos/ignition/tests/servers" "github.com/coreos/ignition/tests/types" // Register the tests @@ -68,9 +69,9 @@ func TestMain(m *testing.M) { flag.Parse() if !listSubtests { - httpServer := &HTTPServer{} + httpServer := &servers.HTTPServer{} httpServer.Start() - tftpServer := &TFTPServer{} + tftpServer := &servers.TFTPServer{} tftpServer.Start() } os.Exit(m.Run()) diff --git a/tests/negative/files/invalid_hash.go b/tests/negative/files/invalid_hash.go index d94b2fb25..585b6462b 100644 --- a/tests/negative/files/invalid_hash.go +++ b/tests/negative/files/invalid_hash.go @@ -50,7 +50,7 @@ func InvalidHash() types.Test { "source": "data:,asdf", "verification": {"hash": "sha512-1a04c76c17079cd99e688ba4f1ba095b927d3fecf2b1e027af361dfeafb548f7f5f6fdd675aaa2563950db441d893ca77b0c3e965cdcb891784af96e330267d7"}} }]} }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -78,7 +78,7 @@ func InvalidHashFromHTTPURL() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ diff --git a/tests/negative/files/link.go b/tests/negative/files/link.go index e95cfbcb8..d41a8dde9 100644 --- a/tests/negative/files/link.go +++ b/tests/negative/files/link.go @@ -49,7 +49,7 @@ func WriteOverBrokenSymlink() types.Test { Target: "/usr/rofile", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -97,7 +97,7 @@ func WriteThroughRelativeSymlink() types.Test { Hard: false, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -145,7 +145,7 @@ func WriteThroughRelativeSymlinkBeyondRoot() types.Test { Hard: false, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -193,7 +193,7 @@ func WriteThroughAbsoluteSymlink() types.Test { Hard: false, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/files/missing_file.go b/tests/negative/files/missing_file.go index 710dcbc1c..a4b051afa 100644 --- a/tests/negative/files/missing_file.go +++ b/tests/negative/files/missing_file.go @@ -39,7 +39,7 @@ func MissingRemoteContentsHTTP() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -65,7 +65,7 @@ func MissingRemoteContentsTFTP() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/files/preexisting_nodes.go b/tests/negative/files/preexisting_nodes.go index 0863f6328..062afcc6c 100644 --- a/tests/negative/files/preexisting_nodes.go +++ b/tests/negative/files/preexisting_nodes.go @@ -45,7 +45,7 @@ func ForceFileCreation() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -88,7 +88,7 @@ func ForceFileCreationNoOverwrite() types.Test { Contents: "hello, world", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -111,7 +111,7 @@ func ForceDirCreation() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -150,7 +150,7 @@ func ForceLinkCreation() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -190,7 +190,7 @@ func ForceHardLinkCreation() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -226,7 +226,7 @@ func ForceFileCreationOverNonemptyDir() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -265,7 +265,7 @@ func ForceLinkCreationOverNonemptyDir() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ diff --git a/tests/negative/filesystems/no_device.go b/tests/negative/filesystems/no_device.go index 36327e1ec..1437ec7bf 100644 --- a/tests/negative/filesystems/no_device.go +++ b/tests/negative/filesystems/no_device.go @@ -36,7 +36,7 @@ func NoDevice() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/filesystems/no_filesystem_type.go b/tests/negative/filesystems/no_filesystem_type.go index b03f4620a..d8354f899 100644 --- a/tests/negative/filesystems/no_filesystem_type.go +++ b/tests/negative/filesystems/no_filesystem_type.go @@ -42,7 +42,7 @@ func NoFilesystemType() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/filesystems/symlinks.go b/tests/negative/filesystems/symlinks.go index e2cdbe615..65d32ffa2 100644 --- a/tests/negative/filesystems/symlinks.go +++ b/tests/negative/filesystems/symlinks.go @@ -53,7 +53,7 @@ func UsesSymlinks() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/general/config.go b/tests/negative/general/config.go index 321e8939d..bb7da2a4f 100644 --- a/tests/negative/general/config.go +++ b/tests/negative/general/config.go @@ -31,7 +31,6 @@ func init() { register.Register(register.NegativeTest, AppendConfigWithMissingFileHTTP()) register.Register(register.NegativeTest, AppendConfigWithMissingFileTFTP()) register.Register(register.NegativeTest, VersionOnlyConfig24()) - register.Register(register.NegativeTest, VersionOnlyConfig30()) register.Register(register.NegativeTest, VersionOnlyConfig31()) register.Register(register.NegativeTest, MergingCanFail()) } @@ -57,7 +56,7 @@ func ReplaceConfigWithInvalidHash() types.Test { } } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -96,7 +95,7 @@ func AppendConfigWithInvalidHash() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -122,7 +121,7 @@ func ReplaceConfigWithMissingFileHTTP() types.Test { } } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -147,7 +146,7 @@ func ReplaceConfigWithMissingFileTFTP() types.Test { } } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -172,7 +171,7 @@ func AppendConfigWithMissingFileHTTP() types.Test { } } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -197,7 +196,7 @@ func AppendConfigWithMissingFileTFTP() types.Test { } } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -227,25 +226,6 @@ func VersionOnlyConfig24() types.Test { } } -func VersionOnlyConfig30() types.Test { - name := "Version Only Config 3.0.0" - in := types.GetBaseDisk() - out := in - config := `{ - "ignition": { - "version": "3.0.0" - } - }` - - return types.Test{ - Name: name, - In: in, - Out: out, - Config: config, - ConfigShouldBeBad: true, - } -} - func VersionOnlyConfig31() types.Test { name := "Version Only Config 3.1.0-experimental" in := types.GetBaseDisk() @@ -278,7 +258,7 @@ func MergingCanFail() types.Test { } appendedConfig := `{ "ignition": { - "version": "3.0.0-experimental" + "version": "3.0.0" }, "storage": { "filesystems": [{ @@ -292,7 +272,7 @@ func MergingCanFail() types.Test { config := fmt.Sprintf(`{ "ignition": { - "version": "3.0.0-experimental", + "version": "3.0.0", "config": { "merge": [{ "source": "%s" diff --git a/tests/negative/partitions/simple.go b/tests/negative/partitions/simple.go index d3db96795..bb6a55c01 100644 --- a/tests/negative/partitions/simple.go +++ b/tests/negative/partitions/simple.go @@ -47,7 +47,7 @@ func ShouldNotExistNoWipeEntry() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -78,7 +78,7 @@ func DoesNotMatchNoWipeEntry() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -112,7 +112,7 @@ func ValidAndDoesNotMatchNoWipeEntry() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -147,7 +147,7 @@ func NotThereAndDoesNotMatchNoWipeEntry() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/partitions/zeroes.go b/tests/negative/partitions/zeroes.go index 2cfa9c3d1..644ee153e 100644 --- a/tests/negative/partitions/zeroes.go +++ b/tests/negative/partitions/zeroes.go @@ -49,7 +49,7 @@ func Partition9DoesNotFillDisk() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -87,7 +87,7 @@ func Partition9DoesNotStartCorrectly() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/regression/filesystem.go b/tests/negative/regression/filesystem.go index ca07d46d9..b2cfc27f9 100644 --- a/tests/negative/regression/filesystem.go +++ b/tests/negative/regression/filesystem.go @@ -46,7 +46,7 @@ func VFATIgnoresWipeFilesystem() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/security/tls.go b/tests/negative/security/tls.go index bf8d9737d..a485c9368 100644 --- a/tests/negative/security/tls.go +++ b/tests/negative/security/tls.go @@ -75,7 +75,7 @@ AKbyaAqbChEy9CvDgyv6qxTYU+eeBImLKS3PH2uW5etc/69V/sDojqpH3hEffsOt -----END CERTIFICATE-----`) customCAServerFile = []byte(`{ - "ignition": { "version": "3.0.0-experimental" }, + "ignition": { "version": "3.0.0" }, "storage": { "files": [{ "path": "/foo/bar", @@ -106,7 +106,7 @@ func AppendConfigCustomCert() types.Test { } } }`, customCAServer.URL) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -137,7 +137,7 @@ func FetchFileCustomCert() types.Test { }] } }`, customCAServer.URL) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/negative/timeouts/timeouts.go b/tests/negative/timeouts/timeouts.go index 1ca8c1297..9b5a0981b 100644 --- a/tests/negative/timeouts/timeouts.go +++ b/tests/negative/timeouts/timeouts.go @@ -84,7 +84,7 @@ func DecreaseHTTPResponseHeadersTimeout() types.Test { ] } }`, respondDelayServer.URL) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -114,7 +114,7 @@ func AppendWithHTTPTimeouts() types.Test { } }`, configDelayServer.URL) configDelayServerURL = configDelayServer.URL - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -140,7 +140,7 @@ func AppendLowerHTTPTimeouts() types.Test { } }`, configDelayServer.URL) configDelayServerURL = configDelayServer.URL - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -201,7 +201,7 @@ func AppendNoneThenLowerHTTPTimeouts() types.Test { } } }`, configNoDelayServer.URL) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/files/directory.go b/tests/positive/files/directory.go index 937b309a4..41a5751fe 100644 --- a/tests/positive/files/directory.go +++ b/tests/positive/files/directory.go @@ -49,7 +49,7 @@ func CreateDirectoryOnRoot() types.Test { }, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -90,7 +90,7 @@ func ForceDirCreation() types.Test { }, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -131,7 +131,7 @@ func ForceDirCreationOverNonemptyDir() types.Test { }, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" // TODO: add ability to ensure that foo/bar/baz doesn't exist here. return types.Test{ @@ -187,7 +187,7 @@ func CheckOrdering() types.Test { Mode: 0755 | int(os.ModeDir), }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -219,7 +219,7 @@ func ApplyDefaultDirectoryPermissions() types.Test { Mode: 0755 | int(os.ModeDir), }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/files/file.go b/tests/positive/files/file.go index 749f06815..426f811a6 100644 --- a/tests/positive/files/file.go +++ b/tests/positive/files/file.go @@ -53,7 +53,7 @@ func CreateFileOnRoot() types.Test { Contents: "example file\n", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -90,7 +90,7 @@ func UserGroupByID() types.Test { Contents: "example file\n", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -127,7 +127,7 @@ func UserGroupByName() types.Test { Contents: "example file\n", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -172,7 +172,7 @@ func ForceFileCreation() types.Test { Contents: "asdf\nfdsa", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -210,7 +210,7 @@ func AppendToAFile() types.Test { Contents: "example file\nhello world\n", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -256,7 +256,7 @@ func AppendToExistingFile() types.Test { Contents: "example file\nhello world\n", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -291,7 +291,7 @@ func AppendToNonexistentFile() types.Test { Contents: "hello world\n", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -326,7 +326,7 @@ func ApplyDefaultFilePermissions() types.Test { Mode: 0644, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/files/hash.go b/tests/positive/files/hash.go index 870699d62..7859eee29 100644 --- a/tests/positive/files/hash.go +++ b/tests/positive/files/hash.go @@ -49,7 +49,7 @@ func ValidateFileHashFromDataURL() types.Test { Contents: "example file\n", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -85,7 +85,7 @@ func ValidateFileHashFromHTTPURL() types.Test { Contents: "asdf\nfdsa", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/files/link.go b/tests/positive/files/link.go index 097e30048..d4a67f736 100644 --- a/tests/positive/files/link.go +++ b/tests/positive/files/link.go @@ -67,7 +67,7 @@ func CreateHardLinkOnRoot() types.Test { Hard: true, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -110,7 +110,7 @@ func CreateSymlinkOnRoot() types.Test { Hard: false, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -168,7 +168,7 @@ func ForceLinkCreation() types.Test { Target: "/foo/target", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -228,7 +228,7 @@ func ForceHardLinkCreation() types.Test { Hard: true, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -290,7 +290,7 @@ func WriteOverSymlink() types.Test { Mode: 420, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -334,7 +334,7 @@ func WriteOverBrokenSymlink() types.Test { Mode: 420, }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/files/remote.go b/tests/positive/files/remote.go index 2b030a8d6..5bd274c4a 100644 --- a/tests/positive/files/remote.go +++ b/tests/positive/files/remote.go @@ -48,7 +48,7 @@ func CreateFileFromRemoteContentsHTTP() types.Test { Contents: "asdf\nfdsa", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -83,7 +83,7 @@ func CreateFileFromRemoteContentsTFTP() types.Test { Contents: "asdf\nfdsa", }, }) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/filesystems/creation.go b/tests/positive/filesystems/creation.go index b10a712ac..a600cad59 100644 --- a/tests/positive/filesystems/creation.go +++ b/tests/positive/filesystems/creation.go @@ -47,7 +47,7 @@ func WipeFilesystemWithSameType() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemType = "ext4" out[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemType = "ext4" @@ -148,7 +148,7 @@ func FilesystemCreationOnMultipleDisks() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/filesystems/reformat_filesystem.go b/tests/positive/filesystems/reformat_filesystem.go index 500f7f85f..1f300dabd 100644 --- a/tests/positive/filesystems/reformat_filesystem.go +++ b/tests/positive/filesystems/reformat_filesystem.go @@ -48,7 +48,7 @@ func ReformatToBTRFS() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.GetPartition("OEM").FilesystemType = "btrfs" return types.Test{ @@ -84,7 +84,7 @@ func ReformatToXFS() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.GetPartition("OEM").FilesystemType = "xfs" return types.Test{ @@ -120,7 +120,7 @@ func ReformatToVFAT() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.GetPartition("OEM").FilesystemType = "vfat" out[0].Partitions.GetPartition("OEM").FilesystemUUID = "2e24ec82" @@ -157,7 +157,7 @@ func ReformatToEXT4() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.GetPartition("OEM").FilesystemType = "ext2" out[0].Partitions.GetPartition("OEM").FilesystemType = "ext4" out[0].Partitions.GetPartition("OEM").FilesystemUUID = "$uuid0" @@ -195,7 +195,7 @@ func ReformatToSWAP() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.GetPartition("OEM").FilesystemType = "ext2" out[0].Partitions.GetPartition("OEM").FilesystemType = "swap" out[0].Partitions.GetPartition("OEM").FilesystemUUID = "$uuid0" diff --git a/tests/positive/filesystems/reuse_filesystem.go b/tests/positive/filesystems/reuse_filesystem.go index 88c826c72..9828604c1 100644 --- a/tests/positive/filesystems/reuse_filesystem.go +++ b/tests/positive/filesystems/reuse_filesystem.go @@ -47,7 +47,7 @@ func ReuseExistingFilesystem() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in = append(in, types.Disk{ Alignment: types.IgnitionAlignment, Partitions: types.Partitions{ diff --git a/tests/positive/general/general.go b/tests/positive/general/general.go index 02d41dfc3..2ce4d910b 100644 --- a/tests/positive/general/general.go +++ b/tests/positive/general/general.go @@ -15,7 +15,10 @@ package general import ( + "strings" + "github.com/coreos/ignition/tests/register" + "github.com/coreos/ignition/tests/servers" "github.com/coreos/ignition/tests/types" ) @@ -56,7 +59,7 @@ func ReformatFilesystemAndWriteFile() types.Test { "contents": {"source": "data:,asdf"} }]} }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemType = "ext4" out[0].Partitions.GetPartition("EFI-SYSTEM").Files = []types.File{ @@ -83,18 +86,18 @@ func ReplaceConfigWithRemoteConfigHTTP() types.Test { name := "Replacing the Config with a Remote Config from HTTP" in := types.GetBaseDisk() out := types.GetBaseDisk() - config := `{ + config := strings.Replace(`{ "ignition": { "version": "$version", "config": { "replace": { "source": "http://127.0.0.1:8080/config", - "verification": { "hash": "sha512-3917a12839de1fc23681bf6efe55b8d721fe136d8d059b8800cfe2f79581170aed7de36b68c54821015d9dda256e5a5310be1aa86e07f65adc1bdd7c3f4da639" } + "verification": { "hash": "sha512-HASH" } } } } - }` - configMinVersion := "3.0.0-experimental" + }`, "HASH", servers.ConfigHash, 1) + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -118,18 +121,18 @@ func ReplaceConfigWithRemoteConfigTFTP() types.Test { name := "Replacing the Config with a Remote Config from TFTP" in := types.GetBaseDisk() out := types.GetBaseDisk() - config := `{ + config := strings.Replace(`{ "ignition": { "version": "$version", "config": { "replace": { "source": "tftp://127.0.0.1:69/config", - "verification": { "hash": "sha512-3917a12839de1fc23681bf6efe55b8d721fe136d8d059b8800cfe2f79581170aed7de36b68c54821015d9dda256e5a5310be1aa86e07f65adc1bdd7c3f4da639" } + "verification": { "hash": "sha512-HASH" } } } } - }` - configMinVersion := "3.0.0-experimental" + }`, "HASH", servers.ConfigHash, 1) + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -153,13 +156,13 @@ func AppendConfigWithRemoteConfigHTTP() types.Test { name := "Appending to the Config with a Remote Config from HTTP" in := types.GetBaseDisk() out := types.GetBaseDisk() - config := `{ + config := strings.Replace(`{ "ignition": { "version": "$version", "config": { "merge": [{ "source": "http://127.0.0.1:8080/config", - "verification": { "hash": "sha512-3917a12839de1fc23681bf6efe55b8d721fe136d8d059b8800cfe2f79581170aed7de36b68c54821015d9dda256e5a5310be1aa86e07f65adc1bdd7c3f4da639" } + "verification": { "hash": "sha512-HASH" } }] } }, @@ -169,8 +172,8 @@ func AppendConfigWithRemoteConfigHTTP() types.Test { "contents": { "source": "data:,another%20example%20file%0A" } }] } - }` - configMinVersion := "3.0.0-experimental" + }`, "HASH", servers.ConfigHash, 1) + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -201,13 +204,13 @@ func AppendConfigWithRemoteConfigTFTP() types.Test { name := "Appending to the Config with a Remote Config from TFTP" in := types.GetBaseDisk() out := types.GetBaseDisk() - config := `{ + config := strings.Replace(`{ "ignition": { "version": "$version", "config": { "merge": [{ "source": "tftp://127.0.0.1:69/config", - "verification": { "hash": "sha512-3917a12839de1fc23681bf6efe55b8d721fe136d8d059b8800cfe2f79581170aed7de36b68c54821015d9dda256e5a5310be1aa86e07f65adc1bdd7c3f4da639" } + "verification": { "hash": "sha512-HASH" } }] } }, @@ -217,8 +220,8 @@ func AppendConfigWithRemoteConfigTFTP() types.Test { "contents": { "source": "data:,another%20example%20file%0A" } }] } - }` - configMinVersion := "3.0.0-experimental" + }`, "HASH", servers.ConfigHash, 1) + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -254,12 +257,12 @@ func ReplaceConfigWithRemoteConfigData() types.Test { "version": "$version", "config": { "replace": { - "source": "data:,%7B%22ignition%22%3A%7B%22version%22%3A%20%223.0.0-experimental%22%7D%2C%22storage%22%3A%20%7B%22files%22%3A%20%5B%7B%22filesystem%22%3A%20%22root%22%2C%22path%22%3A%20%22%2Ffoo%2Fbar%22%2C%22contents%22%3A%7B%22source%22%3A%22data%3A%2Canother%2520example%2520file%250A%22%7D%7D%5D%7D%7D%0A" + "source": "data:,%7B%22ignition%22%3A%7B%22version%22%3A%20%223.0.0%22%7D%2C%22storage%22%3A%20%7B%22files%22%3A%20%5B%7B%22filesystem%22%3A%20%22root%22%2C%22path%22%3A%20%22%2Ffoo%2Fbar%22%2C%22contents%22%3A%7B%22source%22%3A%22data%3A%2Canother%2520example%2520file%250A%22%7D%7D%5D%7D%7D%0A" } } } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -288,12 +291,12 @@ func AppendConfigWithRemoteConfigData() types.Test { "version": "$version", "config": { "merge": [{ - "source": "data:,%7B%22ignition%22%3A%7B%22version%22%3A%20%223.0.0-experimental%22%7D%2C%22storage%22%3A%20%7B%22files%22%3A%20%5B%7B%22filesystem%22%3A%20%22root%22%2C%22path%22%3A%20%22%2Ffoo%2Fbar%22%2C%22contents%22%3A%7B%22source%22%3A%22data%3A%2Canother%2520example%2520file%250A%22%7D%7D%5D%7D%7D%0A" + "source": "data:,%7B%22ignition%22%3A%7B%22version%22%3A%20%223.0.0%22%7D%2C%22storage%22%3A%20%7B%22files%22%3A%20%5B%7B%22filesystem%22%3A%20%22root%22%2C%22path%22%3A%20%22%2Ffoo%2Fbar%22%2C%22contents%22%3A%7B%22source%22%3A%22data%3A%2Canother%2520example%2520file%250A%22%7D%7D%5D%7D%7D%0A" }] } } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -320,7 +323,7 @@ func VersionOnlyConfig() types.Test { config := `{ "ignition": {"version": "$version"} }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/general/preemption.go b/tests/positive/general/preemption.go index 348f2b710..68eaf19df 100644 --- a/tests/positive/general/preemption.go +++ b/tests/positive/general/preemption.go @@ -43,7 +43,7 @@ func makePreemptTest(components string) types.Test { } makeConfig := func(component string) string { return fmt.Sprintf(`{ - "ignition": {"version": "3.0.0-experimental"}, + "ignition": {"version": "3.0.0"}, "storage": { "files": [{ "path": "/ignition/%s", diff --git a/tests/positive/partitions/complex-mb.go b/tests/positive/partitions/complex-mb.go index 840e419df..c1d3a258f 100644 --- a/tests/positive/partitions/complex-mb.go +++ b/tests/positive/partitions/complex-mb.go @@ -166,6 +166,6 @@ func KitchenSinkMiB() types.Test { In: in, Out: out, Config: config, - ConfigMinVersion: "3.0.0-experimental", + ConfigMinVersion: "3.0.0", } } diff --git a/tests/positive/partitions/complex.go b/tests/positive/partitions/complex.go index 2f9039a58..0ccae60f0 100644 --- a/tests/positive/partitions/complex.go +++ b/tests/positive/partitions/complex.go @@ -74,7 +74,7 @@ func KitchenSink() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in = append(in, types.Disk{ Alignment: types.IgnitionAlignment, diff --git a/tests/positive/partitions/creation-mb.go b/tests/positive/partitions/creation-mb.go index 4ec135427..0d639f999 100644 --- a/tests/positive/partitions/creation-mb.go +++ b/tests/positive/partitions/creation-mb.go @@ -69,7 +69,7 @@ func CreatePartitionMiB() types.Test { In: in, Out: out, Config: config, - ConfigMinVersion: "3.0.0-experimental", + ConfigMinVersion: "3.0.0", } } @@ -115,7 +115,7 @@ func CreatePartitionMiBWithStart() types.Test { In: in, Out: out, Config: config, - ConfigMinVersion: "3.0.0-experimental", + ConfigMinVersion: "3.0.0", } } @@ -199,7 +199,7 @@ func WipeAndCreateNewPartitionsMiB() types.Test { In: in, Out: out, Config: config, - ConfigMinVersion: "3.0.0-experimental", + ConfigMinVersion: "3.0.0", } } @@ -291,7 +291,7 @@ func AppendPartitionsMiB() types.Test { In: in, Out: out, Config: config, - ConfigMinVersion: "3.0.0-experimental", + ConfigMinVersion: "3.0.0", } } @@ -325,6 +325,6 @@ func ResizeRootMiB() types.Test { In: in, Out: out, Config: config, - ConfigMinVersion: "3.0.0-experimental", + ConfigMinVersion: "3.0.0", } } diff --git a/tests/positive/partitions/creation.go b/tests/positive/partitions/creation.go index e215719b7..86066953c 100644 --- a/tests/positive/partitions/creation.go +++ b/tests/positive/partitions/creation.go @@ -63,7 +63,7 @@ func CreatePartition() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -107,7 +107,7 @@ func WipeAndCreateNewPartitions() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" // Create dummy partitions. The UUIDs in the input partitions // are intentionally different so if Ignition doesn't do the right thing the // validation will fail. @@ -188,7 +188,7 @@ func AppendPartitions() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in = append(in, types.Disk{ Alignment: types.IgnitionAlignment, @@ -276,7 +276,7 @@ func ResizeRoot() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/partitions/deletion.go b/tests/positive/partitions/deletion.go index 632dee042..871580a22 100644 --- a/tests/positive/partitions/deletion.go +++ b/tests/positive/partitions/deletion.go @@ -57,7 +57,7 @@ func DeleteOne() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -121,7 +121,7 @@ func DeleteAll() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/partitions/mixed.go b/tests/positive/partitions/mixed.go index 96a15a230..d6e072e88 100644 --- a/tests/positive/partitions/mixed.go +++ b/tests/positive/partitions/mixed.go @@ -112,7 +112,7 @@ func Match1Recreate1Delete1Create1() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -209,7 +209,7 @@ func NothingMatches() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/partitions/no-op.go b/tests/positive/partitions/no-op.go index a8c6e65c4..5a46cf6ca 100644 --- a/tests/positive/partitions/no-op.go +++ b/tests/positive/partitions/no-op.go @@ -41,7 +41,7 @@ func DoNothing() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -99,7 +99,7 @@ func SpecifiedNonexistent() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/partitions/verification.go b/tests/positive/partitions/verification.go index fd35679f0..a6d18ac54 100644 --- a/tests/positive/partitions/verification.go +++ b/tests/positive/partitions/verification.go @@ -92,7 +92,7 @@ func VerifyBaseDisk() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -178,7 +178,7 @@ func VerifyBaseDiskWithWipe() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/partitions/zeros.go b/tests/positive/partitions/zeros.go index a7c1aaffd..db0a28b59 100644 --- a/tests/positive/partitions/zeros.go +++ b/tests/positive/partitions/zeros.go @@ -52,7 +52,7 @@ func PartitionSizeStart0() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in = append(in, types.Disk{ Alignment: types.IgnitionAlignment, @@ -112,7 +112,7 @@ func PartitionStartNumber0() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in = append(in, types.Disk{ Alignment: types.IgnitionAlignment, @@ -177,7 +177,7 @@ func ResizeRootFillDisk() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -210,7 +210,7 @@ func VerifyRootFillsDisk() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -245,7 +245,7 @@ func VerifyUnspecifiedIsDoNotCare() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, @@ -307,7 +307,7 @@ func NumberZeroHappensLast() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" return types.Test{ Name: name, diff --git a/tests/positive/passwd/users.go b/tests/positive/passwd/users.go index 916faee27..6f857be60 100644 --- a/tests/positive/passwd/users.go +++ b/tests/positive/passwd/users.go @@ -48,7 +48,7 @@ func AddPasswdUsers() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -182,7 +182,7 @@ func UseAuthorizedKeysFile() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ diff --git a/tests/positive/regression/filesystem.go b/tests/positive/regression/filesystem.go index bc82b31b4..a2877a749 100644 --- a/tests/positive/regression/filesystem.go +++ b/tests/positive/regression/filesystem.go @@ -48,7 +48,7 @@ func EquivalentFilesystemUUIDsTreatedDistinctEXT4() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemType = "ext4" out[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemType = "ext4" in[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemUUID = "$uuid0" @@ -88,7 +88,7 @@ func EquivalentFilesystemUUIDsTreatedDistinctVFAT() types.Test { ] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" in[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemUUID = "2e24ec82" out[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemUUID = "2e24ec82" out[0].Partitions.GetPartition("EFI-SYSTEM").FilesystemType = "vfat" diff --git a/tests/positive/security/tls.go b/tests/positive/security/tls.go index ebd0151e1..49f6e0717 100644 --- a/tests/positive/security/tls.go +++ b/tests/positive/security/tls.go @@ -74,7 +74,7 @@ AKbyaAqbChEy9CvDgyv6qxTYU+eeBImLKS3PH2uW5etc/69V/sDojqpH3hEffsOt -----END CERTIFICATE-----`) customCAServerFile = []byte(`{ - "ignition": { "version": "3.0.0-experimental" }, + "ignition": { "version": "3.0.0" }, "storage": { "files": [{ "path": "/foo/bar", @@ -109,7 +109,7 @@ func AppendConfigCustomCert() types.Test { } } }`, customCAServer.URL, dataurl.EncodeBytes(publicKey)) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { @@ -154,7 +154,7 @@ func FetchFileCustomCert() types.Test { }] } }`, dataurl.EncodeBytes(publicKey), customCAServer.URL) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { diff --git a/tests/positive/systemd/create_unit.go b/tests/positive/systemd/create_unit.go index ade38cd42..d89fff987 100644 --- a/tests/positive/systemd/create_unit.go +++ b/tests/positive/systemd/create_unit.go @@ -37,7 +37,7 @@ func CreateSystemdService() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ diff --git a/tests/positive/systemd/modify_service.go b/tests/positive/systemd/modify_service.go index c28ca5e29..e423ecbd0 100644 --- a/tests/positive/systemd/modify_service.go +++ b/tests/positive/systemd/modify_service.go @@ -40,7 +40,7 @@ func ModifySystemdService() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -73,7 +73,7 @@ func MaskSystemdServices() types.Test { }] } }` - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddLinks("ROOT", []types.Link{ { Node: types.Node{ diff --git a/tests/positive/timeouts/timeouts.go b/tests/positive/timeouts/timeouts.go index 1a9884bfc..1412f4615 100644 --- a/tests/positive/timeouts/timeouts.go +++ b/tests/positive/timeouts/timeouts.go @@ -78,7 +78,7 @@ func IncreaseHTTPResponseHeadersTimeout() types.Test { ] } }`, respondDelayServer.URL) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ @@ -117,7 +117,7 @@ func ConfirmHTTPBackoffWorks() types.Test { ] } }`, respondThrottledServer.URL) - configMinVersion := "3.0.0-experimental" + configMinVersion := "3.0.0" out[0].Partitions.AddFiles("ROOT", []types.File{ { Node: types.Node{ diff --git a/tests/register/register.go b/tests/register/register.go index 13e73ed6b..8a092450a 100644 --- a/tests/register/register.go +++ b/tests/register/register.go @@ -16,7 +16,7 @@ package register import ( "github.com/coreos/go-semver/semver" - types30 "github.com/coreos/ignition/config/v3_0_experimental/types" + types30 "github.com/coreos/ignition/config/v3_0/types" "github.com/coreos/ignition/tests/types" ) diff --git a/tests/servers.go b/tests/servers/servers.go similarity index 75% rename from tests/servers.go rename to tests/servers/servers.go index f436cb179..a6df79e59 100644 --- a/tests/servers.go +++ b/tests/servers/servers.go @@ -12,10 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -package blackbox +package servers import ( "bytes" + "crypto/sha512" + "encoding/hex" "fmt" "io" "net/http" @@ -26,22 +28,32 @@ import ( "github.com/pin/tftp" ) -// HTTP Server -func (server *HTTPServer) Config(w http.ResponseWriter, r *http.Request) { - w.Write([]byte(`{ - "ignition": { "version": "3.0.0-experimental" }, +var ( + servedConfig = []byte(`{ + "ignition": { "version": "3.0.0" }, "storage": { "files": [{ "path": "/foo/bar", "contents": { "source": "data:,example%20file%0A" } }] } -}`)) +}`) + servedContents = []byte(`asdf +fdsa`) + // export these so tests don't have to hard-code them everywhere + configRawHash = sha512.Sum512(servedConfig) + contentsRawHash = sha512.Sum512(servedContents) + ConfigHash = hex.EncodeToString(configRawHash[:]) + ContentsHash = hex.EncodeToString(contentsRawHash[:]) +) + +// HTTP Server +func (server *HTTPServer) Config(w http.ResponseWriter, r *http.Request) { + w.Write(servedConfig) } func (server *HTTPServer) Contents(w http.ResponseWriter, r *http.Request) { - w.Write([]byte(`asdf -fdsa`)) + w.Write(servedContents) } type HTTPServer struct{} @@ -58,18 +70,9 @@ func (server *HTTPServer) Start() { func (server *TFTPServer) ReadHandler(filename string, rf io.ReaderFrom) error { var buf *bytes.Reader if strings.Contains(filename, "contents") { - buf = bytes.NewReader([]byte(`asdf -fdsa`)) + buf = bytes.NewReader(servedContents) } else if strings.Contains(filename, "config") { - buf = bytes.NewReader([]byte(`{ - "ignition": { "version": "3.0.0-experimental" }, - "storage": { - "files": [{ - "path": "/foo/bar", - "contents": { "source": "data:,example%20file%0A" } - }] - } -}`)) + buf = bytes.NewReader(servedConfig) } else { return fmt.Errorf("no such file %q", filename) } diff --git a/validate/main.go b/validate/main.go index dc12a7f96..14b4f37fa 100644 --- a/validate/main.go +++ b/validate/main.go @@ -21,7 +21,7 @@ import ( "os" "strings" - config "github.com/coreos/ignition/config/v3_0_experimental" + config "github.com/coreos/ignition/config/v3_0" "github.com/coreos/ignition/internal/version" )