github.com/vmware/govmomi@v0.43.0/govc/test/vsan.bats (about)

     1  #!/usr/bin/env bats
     2  
     3  load test_helper
     4  
     5  @test "vsan.change" {
     6    vcsim_env -cluster 2
     7  
     8    run govc vsan.change DC0_C0
     9    assert_failure # no flags specified
    10  
    11    run govc vsan.info -json DC0_C0
    12    assert_success
    13    config=$(jq .clusters[].info.UnmapConfig <<<"$output")
    14    assert_equal null "$config"
    15  
    16    run govc vsan.change -unmap-enabled DC0_C0
    17    assert_success
    18  
    19    run govc vsan.info -json DC0_C0
    20    assert_success
    21  
    22    config=$(jq .clusters[].info.UnmapConfig.Enable <<<"$output")
    23    assert_equal true "$config"
    24  
    25    run govc vsan.info -json DC0_C0
    26    assert_success
    27    config=$(jq .clusters[].info.FileServiceConfig <<<"$output")
    28    assert_equal null "$config"
    29  
    30    run govc vsan.change -file-service-enabled DC0_C0
    31    assert_success
    32  
    33    run govc vsan.info -json DC0_C0
    34    assert_success
    35  
    36    config=$(jq .clusters[].info.FileServiceConfig.Enabled <<<"$output")
    37    assert_equal true "$config"
    38  }