-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --env-admin-role CLI option; Add a lot of tests for new object types
- Loading branch information
Showing
55 changed files
with
988 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
...me,timestamp_ltz,timestamp_ntz,timestamp_tz,variant,object,array,geography,geometry).yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
arguments: | ||
num1: | ||
type: NUMBER(10,0) | ||
num2: | ||
type: NUMBER(10,5) | ||
default: 123.456 | ||
dbl: | ||
type: FLOAT | ||
default: 123.456 | ||
bin1: | ||
type: BINARY(10) | ||
default: "TO_BINARY('SUN', 'utf-8')" | ||
var1: | ||
type: VARCHAR(10) | ||
default: "'abc'" | ||
dt1: | ||
type: DATE | ||
default: "'2023-01-01'::date" | ||
tm1: | ||
type: TIME(9) | ||
default: "'01:02:03.123'::time" | ||
ltz1: | ||
type: TIMESTAMP_LTZ(9) | ||
default: "'2023-01-02 16:00:00'::timestamp_ltz" | ||
ntz1: | ||
type: TIMESTAMP_NTZ(9) | ||
default: "'2023-01-02 16:00:00'::timestamp_ntz" | ||
tz1: | ||
type: TIMESTAMP_TZ(9) | ||
default: "'2023-01-02 16:00:00 +01:00'::timestamp_tz" | ||
var: | ||
type: VARIANT | ||
default: "PARSE_JSON('{\"foo\": \"bar\"}')::variant" | ||
obj: | ||
type: OBJECT | ||
default: "PARSE_JSON('{\"foo\": \"bar\"}')::object" | ||
arr: | ||
type: ARRAY | ||
default: "PARSE_JSON('[1, 2, 3]')::array" | ||
geo1: | ||
type: GEOGRAPHY | ||
default: "TO_GEOGRAPHY('POINT(0 0)')" | ||
geo2: | ||
type: GEOMETRY | ||
default: "TO_GEOMETRY('POINT(0 0)')" | ||
|
||
|
||
returns: | ||
num1: NUMBER(10,0) | ||
num2: NUMBER(10,5) | ||
dbl: FLOAT | ||
bin1: BINARY(10) | ||
var1: VARCHAR(10) | ||
dt1: DATE | ||
tm1: TIME(9) | ||
ltz1: TIMESTAMP_LTZ(9) | ||
ntz1: TIMESTAMP_NTZ(9) | ||
tz1: TIMESTAMP_TZ(9) | ||
var: VARIANT | ||
obj: OBJECT | ||
arr: ARRAY | ||
geo1: GEOGRAPHY | ||
geo2: GEOMETRY | ||
|
||
|
||
body: |- | ||
SELECT NUM1, NUM2 | ||
, DBL | ||
, BIN1 | ||
, VAR1 | ||
, DT1 | ||
, TM1 | ||
, LTZ1 | ||
, NTZ1 | ||
, TZ1 | ||
, VAR, OBJ, ARR | ||
, GEO1, GEO2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
language: python | ||
runtime_version: "3.10" | ||
handler: get_fact | ||
packages: | ||
- requests | ||
|
||
external_access_integrations: | ||
- fn009_eai1 | ||
secrets: | ||
foo: fn009_se1 | ||
bar: fn009_se2 | ||
|
||
returns: VARIANT | ||
|
||
body: |- | ||
import _snowflake | ||
import requests | ||
def get_fact(): | ||
response = requests.get("https://catfact.ninja/fact") | ||
return { | ||
"foo": _snowflake.get_generic_secret_string("foo"), | ||
"bar": _snowflake.get_generic_secret_string("bar"), | ||
"fact": response.json()["fact"], | ||
"length": response.json()["length"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: HOST_PORT | ||
mode: EGRESS | ||
value_list: | ||
- example.com | ||
- company.com:443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type: HOST_PORT | ||
mode: EGRESS | ||
value_list: | ||
- catfact.ninja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type: HOST_PORT | ||
mode: EGRESS | ||
value_list: | ||
- catfact.ninja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type: IPV4 | ||
mode: INGRESS | ||
value_list: | ||
- 192.168.2.0/24 | ||
- 192.168.1.99 | ||
|
||
comment: abc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: HOST_PORT | ||
mode: EGRESS | ||
value_list: | ||
- example.com | ||
- company.com:443 |
76 changes: 76 additions & 0 deletions
76
...ary,varchar,date,time,timestamp_ltz,timestamp_ntz,timestamp_tz,variant,object,array).yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
arguments: | ||
num1: | ||
type: NUMBER(10,0) | ||
default: 0 | ||
num2: | ||
type: NUMBER(10,5) | ||
default: 10.15 | ||
dbl: | ||
type: FLOAT | ||
default: 10.15 | ||
bin1: | ||
type: BINARY(10) | ||
default: TO_BINARY('SUN', 'utf-8') | ||
var1: | ||
type: VARCHAR(10) | ||
default: "'abc'" | ||
dt1: | ||
type: DATE | ||
default: CURRENT_DATE() | ||
tm1: | ||
type: TIME(9) | ||
default: "'01:02:03'::time" | ||
ltz1: | ||
type: TIMESTAMP_LTZ(9) | ||
default: CURRENT_TIMESTAMP() | ||
ntz1: | ||
type: TIMESTAMP_NTZ(9) | ||
default: CURRENT_TIMESTAMP() | ||
tz1: | ||
type: TIMESTAMP_TZ(9) | ||
default: CURRENT_TIMESTAMP() | ||
var: | ||
type: VARIANT | ||
default: "PARSE_JSON('{\"foo\": \"bar\"}')::variant" | ||
obj: | ||
type: OBJECT | ||
default: "PARSE_JSON('{\"foo\": \"bar\"}')::object" | ||
arr: | ||
type: ARRAY | ||
default: "PARSE_JSON('[1, 2, 3]')::array" | ||
|
||
|
||
returns: | ||
num1: NUMBER(10,0) | ||
num2: NUMBER(10,5) | ||
dbl: FLOAT | ||
bin1: BINARY(10) | ||
var1: VARCHAR(10) | ||
dt1: DATE | ||
tm1: TIME(0) | ||
ltz1: TIMESTAMP_LTZ(9) | ||
ntz1: TIMESTAMP_NTZ(9) | ||
tz1: TIMESTAMP_TZ(9) | ||
var: VARIANT | ||
obj: OBJECT | ||
arr: ARRAY | ||
|
||
body: |- | ||
DECLARE | ||
res resultset default ( | ||
SELECT :NUM1, :NUM2 | ||
, :DBL | ||
, :BIN1 | ||
, :VAR1 | ||
, :DT1 | ||
, :TM1 | ||
, :LTZ1 | ||
, :NTZ1 | ||
, :TZ1 | ||
, :VAR, :OBJ, :ARR | ||
); | ||
BEGIN | ||
RETURN table(res); | ||
END; | ||
comment: abc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: oauth2 | ||
api_authentication: TEST_API_SECURITY_INTEGRATION | ||
oauth_scopes: | ||
- photo | ||
- offline_access |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type: oauth2 | ||
api_authentication: TEST_API_SECURITY_INTEGRATION | ||
oauth_refresh_token: RjY2NjM5NzA2OWJjuE7c | ||
oauth_refresh_token_expiry_time: "2030-01-01 00:00:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type: generic_string | ||
secret_string: this is foo! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type: generic_string | ||
secret_string: this is bar! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type: generic_string | ||
secret_string: very secret string! | ||
comment: abc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type: password | ||
username: john_doe | ||
password: very secret password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: oauth2 | ||
api_authentication: TEST_API_SECURITY_INTEGRATION | ||
oauth_scopes: | ||
- photo | ||
- offline_access |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type: oauth2 | ||
api_authentication: TEST_API_SECURITY_INTEGRATION | ||
oauth_refresh_token: RjY2NjM5NzA2OWJjuE7c | ||
oauth_refresh_token_expiry_time: "2030-01-01 00:00:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
eai001_eai1: | ||
allowed_network_rules: | ||
- db1.sc1.eai001_nr1 | ||
- db1.sc1.eai001_nr2 | ||
allowed_api_authentication_integrations: | ||
- TEST_API_SECURITY_INTEGRATION | ||
allowed_authentication_secrets: | ||
- db1.sc1.eai001_se1 | ||
- db1.sc1.eai001_se2 | ||
comment: abc | ||
|
||
fn009_eai1: | ||
allowed_network_rules: | ||
- db1.sc1.fn009_nr1 | ||
allowed_authentication_secrets: | ||
- db1.sc1.fn009_se1 | ||
- db1.sc1.fn009_se2 |
Oops, something went wrong.