-
Notifications
You must be signed in to change notification settings - Fork 9
/
test_native.sh
executable file
·68 lines (57 loc) · 2 KB
/
test_native.sh
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
clear
echo " "
echo " _____ __ "
echo " / _ \ _______/ |_____________ "
echo " / /_\ \ / ___/\ __\_ __ \__ \ "
echo " / | \\\___ \ | | | | \// __ \_ "
echo " \____|__ /____ > |__| |__| (____ / "
echo " \/ \/ \/ "
echo " "
runCommand () {
echo "$(tput setaf 3)- $1$(tput sgr0)"
target/astra-native $1
}
echo "$(tput setaf 4)[ORGANIZATION]$(tput sgr0)"
runCommand "org"
runCommand "org -o csv"
runCommand "org -o json"
runCommand "org -v"
runCommand "org id"
runCommand "org name"
echo "$(tput setaf 4)[CONFIGURATION]$(tput sgr0)"
runCommand "config list"
runCommand "config create demo --token $ASTRA_DB_APPLICATION_TOKEN"
runCommand "config get demo"
runCommand "config describe demo"
runCommand "config use demo"
runCommand "config use [email protected]"
runCommand "config delete demo"
echo "$(tput setaf 4)[ROLES]$(tput sgr0)"
runCommand "role list"
runCommand "role describe ad0566b5-2a67-49de-89e8-92258c2f2c98"
runCommand "role get ad0566b5-2a67-49de-89e8-92258c2f2c98"
echo "$(tput setaf 4)[USERS]$(tput sgr0)"
runCommand "user list"
runCommand "user list --no-color"
runCommand "user get [email protected]"
runCommand "user invite [email protected]"
runCommand "user get [email protected]"
runCommand "user delete [email protected]"
echo "$(tput setaf 4)[TOKENS]$(tput sgr0)"
runCommand "token list"
runCommand "token list --no-color"
runCommand "token get [email protected]"
runCommand "user invite [email protected]"
runCommand "user get [email protected]"
runCommand "user delete [email protected]"
echo "$(tput setaf 4)[TOKENS]$(tput sgr0)"
export ROLE_ADMIN=`astra role list | grep Organization | cut -b 3-38`
runCommand 'token create -r $ROLE_ADMIN'
@Group(
name= "token",
description = "Manage tokens",
defaultCommand = TokenGetCmd.class,
commands = {
TokenListCmd.class, TokenGetCmd.class, TokenCreateCmd.class, TokenDeleteCmd.class, TokenRevokeCmd.class
})