forked from vmware/govmomi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsso.bats
executable file
·42 lines (29 loc) · 1.15 KB
/
sso.bats
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bats
load test_helper
@test "sso.service.ls" {
vcsim_env
sts=$(govc option.ls config.vpxd.sso.sts.uri | awk '{print $2}')
# Remove credentials from URL, lookup service allows anonymous access
GOVC_URL="$(govc env GOVC_URL)"
run govc sso.service.ls
assert_success
run govc sso.service.ls -l
assert_success
run govc sso.service.ls -json
assert_success
run govc sso.service.ls -dump
assert_success
[ -z "$(govc sso.service.ls -t enoent)" ]
run govc sso.service.ls -t cs.identity -U
assert_success "$sts"
run govc sso.service.ls -t sso:sts -U
assert_success "$sts"
cert=$(govc about.cert -show | grep -v CERTIFICATE | tr -d '\n')
trust=$(govc sso.service.ls -json -t sso:sts | jq -r .[].ServiceEndpoints[].SslTrust[0])
assert_equal "$cert" "$trust"
govc sso.service.ls -t cs.identity | grep com.vmware.cis | grep -v https:
govc sso.service.ls -t cs.identity -l | grep https:
govc sso.service.ls -p com.vmware.cis -t cs.identity -P wsTrust -T com.vmware.cis.cs.identity.sso -l | grep wsTrust
govc sso.service.ls -P vmomi | grep vcenterserver | grep -v https:
govc sso.service.ls -P vmomi -l | grep https:
}