mirror of
https://github.com/Oxalide/vsphere-influxdb-go.git
synced 2023-10-10 11:36:51 +00:00
add vendoring with go dep
This commit is contained in:
85
vendor/github.com/vmware/govmomi/govc/test/metric.bats
generated
vendored
Executable file
85
vendor/github.com/vmware/govmomi/govc/test/metric.bats
generated
vendored
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
|
||||
@test "metric.ls" {
|
||||
run govc metric.ls
|
||||
assert_failure
|
||||
|
||||
run govc metric.ls enoent
|
||||
assert_failure
|
||||
|
||||
host=$(govc ls -t HostSystem ./... | head -n 1)
|
||||
pool=$(govc ls -t ResourcePool ./... | head -n 1)
|
||||
|
||||
run govc metric.ls "$host"
|
||||
assert_success
|
||||
|
||||
run govc metric.ls -json "$host"
|
||||
assert_success
|
||||
|
||||
run govc metric.ls "$pool"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "metric.sample" {
|
||||
host=$(govc ls -t HostSystem ./... | head -n 1)
|
||||
metrics=($(govc metric.ls "$host"))
|
||||
|
||||
run govc metric.sample "$host" enoent
|
||||
assert_failure
|
||||
|
||||
run govc metric.sample "$host" "${metrics[@]}"
|
||||
assert_success
|
||||
|
||||
run govc metric.sample -instance - "$host" "${metrics[@]}"
|
||||
assert_success
|
||||
|
||||
run govc metric.sample -json "$host" "${metrics[@]}"
|
||||
assert_success
|
||||
|
||||
vm=$(new_ttylinux_vm)
|
||||
|
||||
run govc metric.ls "$vm"
|
||||
assert_output ""
|
||||
|
||||
run govc vm.power -on "$vm"
|
||||
assert_success
|
||||
|
||||
run govc vm.ip "$vm"
|
||||
assert_success
|
||||
|
||||
metrics=($(govc metric.ls "$vm"))
|
||||
|
||||
run govc metric.sample "$vm" "${metrics[@]}"
|
||||
assert_success
|
||||
|
||||
run govc metric.sample -json "$vm" "${metrics[@]}"
|
||||
assert_success
|
||||
|
||||
run govc metric.sample "govc-test-*" "${metrics[@]}"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "metric.info" {
|
||||
host=$(govc ls -t HostSystem ./... | head -n 1)
|
||||
metrics=($(govc metric.ls "$host"))
|
||||
|
||||
run govc metric.info "$host" enoent
|
||||
assert_failure
|
||||
|
||||
run govc metric.info "$host"
|
||||
assert_success
|
||||
|
||||
run govc metric.info -json "$host"
|
||||
assert_success
|
||||
|
||||
run govc metric.sample "$host" "${metrics[@]}"
|
||||
assert_success
|
||||
|
||||
run govc metric.info "$host" "${metrics[@]}"
|
||||
assert_success
|
||||
|
||||
run govc metric.info - "${metrics[@]}"
|
||||
assert_success
|
||||
}
|
||||
Reference in New Issue
Block a user