~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/juju/govmomi/govc/test/cli.bats

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env bats
 
2
 
 
3
load test_helper
 
4
 
 
5
@test "about" {
 
6
  run govc about
 
7
  assert_success
 
8
  assert_line "Vendor: VMware, Inc."
 
9
}
 
10
 
 
11
@test "login attempt without credentials" {
 
12
  run govc about -u $(echo $GOVC_URL | awk -F@ '{print $2}')
 
13
  assert_failure "Error: ServerFaultCode: Cannot complete login due to an incorrect user name or password."
 
14
}
 
15
 
 
16
@test "connect to an endpoint with a non-supported API version" {
 
17
  run env GOVC_MIN_API_VERSION=24.4 govc about
 
18
  assert grep -q "^Error: Require API version 24.4," <<<${output}
 
19
}