github.com/coreos/mantle@v0.13.0/kola/tests/misc/aws.go (about)

     1  // Copyright 2018 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 misc
    16  
    17  import (
    18  	"fmt"
    19  
    20  	"github.com/coreos/go-semver/semver"
    21  	"github.com/coreos/mantle/kola/cluster"
    22  	"github.com/coreos/mantle/kola/register"
    23  )
    24  
    25  func init() {
    26  	register.Register(&register.Test{
    27  		Name:        "coreos.misc.aws.diskfriendlyname",
    28  		Platforms:   []string{"aws"},
    29  		Run:         awsVerifyDiskFriendlyName,
    30  		ClusterSize: 1,
    31  		// Previously broken on NVMe devices, see
    32  		// https://github.com/coreos/bugs/issues/2399
    33  		MinVersion: semver.Version{Major: 1828},
    34  		Distros:    []string{"cl", "rhcos"},
    35  	})
    36  }
    37  
    38  // Check invariants on AWS instances.
    39  
    40  func awsVerifyDiskFriendlyName(c cluster.TestCluster) {
    41  	friendlyName := "/dev/xvda"
    42  	c.MustSSH(c.Machines()[0], fmt.Sprintf("stat %s", friendlyName))
    43  }