Skip to content

Commit

Permalink
testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinzliu committed Jun 15, 2018
1 parent a9dae49 commit 654ff0d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cmd/src/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

cleanup() {
src orgs members remove -org-id=$(src org get -f '{{.ID}}' -name=abc-org) -user-id=$(src users get -f '{{.ID}}' -username=alice)
src orgs delete -id=$(src orgs get -f '{{.ID}}' -name=abc-org)
src users delete -id=$(src users get -f='{{.ID}}' -username=alice)
}

cleanup > /dev/null 2>&1

set -euf -o pipefail

unset CDPATH
cd "$(dirname "${BASH_SOURCE[0]}")/../.." # cd to repo root dir

go install ./cmd/src

src users create -username=alice -email=alice@example.com
src orgs create -name=abc-org
src orgs members add -org-id=$(src org get -f '{{.ID}}' -name=abc-org) -username=alice
cleanup

0 comments on commit 654ff0d

Please sign in to comment.