Skip to content

Commit 654ff0d

Browse files
committed
testing script
1 parent a9dae49 commit 654ff0d

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

cmd/src/test.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
cleanup() {
4+
src orgs members remove -org-id=$(src org get -f '{{.ID}}' -name=abc-org) -user-id=$(src users get -f '{{.ID}}' -username=alice)
5+
src orgs delete -id=$(src orgs get -f '{{.ID}}' -name=abc-org)
6+
src users delete -id=$(src users get -f='{{.ID}}' -username=alice)
7+
}
8+
9+
cleanup > /dev/null 2>&1
10+
11+
set -euf -o pipefail
12+
13+
unset CDPATH
14+
cd "$(dirname "${BASH_SOURCE[0]}")/../.." # cd to repo root dir
15+
16+
go install ./cmd/src
17+
18+
src users create -username=alice -email=alice@example.com
19+
src orgs create -name=abc-org
20+
src orgs members add -org-id=$(src org get -f '{{.ID}}' -name=abc-org) -username=alice
21+
cleanup
22+

0 commit comments

Comments
 (0)