github.com/coreos/mantle@v0.13.0/kola/tests/ignition/ssh.go (about)

     1  // Copyright 2017 CoreOS, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package ignition
    16  
    17  import (
    18  	"github.com/coreos/mantle/kola/register"
    19  	"github.com/coreos/mantle/platform/conf"
    20  )
    21  
    22  func init() {
    23  	// verify that SSH key injection works correctly through Ignition,
    24  	// without injecting via platform metadata
    25  	register.Register(&register.Test{
    26  		Name:             "cl.ignition.v1.ssh.key",
    27  		Run:              empty,
    28  		ClusterSize:      1,
    29  		ExcludePlatforms: []string{"qemu"}, // redundant on qemu
    30  		Flags:            []register.Flag{register.NoSSHKeyInMetadata},
    31  		UserData:         conf.Ignition(`{"ignitionVersion": 1}`),
    32  		Distros:          []string{"cl"},
    33  	})
    34  	register.Register(&register.Test{
    35  		Name:             "coreos.ignition.ssh.key",
    36  		Run:              empty,
    37  		ClusterSize:      1,
    38  		ExcludePlatforms: []string{"qemu"}, // redundant on qemu
    39  		Flags:            []register.Flag{register.NoSSHKeyInMetadata},
    40  		UserData:         conf.Ignition(`{"ignition":{"version":"2.0.0"}}`),
    41  		UserDataV3:       conf.Ignition(`{"ignition":{"version":"3.0.0"}}`),
    42  		Distros:          []string{"cl", "fcos", "rhcos"},
    43  	})
    44  }