github.com/scaleway/scaleway-cli@v1.11.1/pkg/commands/run_test.go (about)

     1  // Copyright (C) 2015 Scaleway. All rights reserved.
     2  // Use of this source code is governed by a MIT-style
     3  // license that can be found in the LICENSE.md file.
     4  
     5  package commands
     6  
     7  func ExampleRun() {
     8  	ctx := testCommandContext()
     9  	args := RunArgs{
    10  		Image:          "ubuntu-trusty",
    11  		CommercialType: "VC1S",
    12  	}
    13  	Run(ctx, args)
    14  }
    15  
    16  func ExampleRun_complex() {
    17  	ctx := testCommandContext()
    18  	args := RunArgs{
    19  		Attach:         false,
    20  		Bootscript:     "rescue",
    21  		Command:        []string{"ls", "-la"},
    22  		Detach:         false,
    23  		Gateway:        "my-gateway",
    24  		Image:          "ubuntu-trusty",
    25  		Name:           "my-test-server",
    26  		CommercialType: "VC1S",
    27  		Tags:           []string{"testing", "fake"},
    28  		Volumes:        []string{"50G", "1G"},
    29  	}
    30  	Run(ctx, args)
    31  }