You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Run integration and acceptance account-level tests
141
-
run: make test-account-level-features
143
+
# pipefail needs to be set to ensure that the exit code of make test command is captured even when piped (otherwise it would take the exit code of make save-test-results)
144
+
run: set -o pipefail && make test-account-level-features | make save-test-results
summary: `Account-level tests ${conclusion}. See the [workflow run](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) for details.`
# pipefail needs to be set to ensure that the exit code of make test command is captured even when piped (otherwise it would take the exit code of make save-test-results)
126
+
run: set -o pipefail && make test-unit | make save-test-results
# pipefail needs to be set to ensure that the exit code of make test command is captured even when piped (otherwise it would take the exit code of make save-test-results)
133
+
run: set -o pipefail && make test-integration | make save-test-results
- name: Run functional tests of the underlying terraform libraries
149
-
run: make test-functional
156
+
# pipefail needs to be set to ensure that the exit code of make test command is captured even when piped (otherwise it would take the exit code of make save-test-results)
157
+
run: set -o pipefail && make test-functional | make save-test-results
# pipefail needs to be set to ensure that the exit code of make test command is captured even when piped (otherwise it would take the exit code of make save-test-results)
164
+
run: set -o pipefail && make test-acceptance | make save-test-results
summary: `Integration tests ${conclusion}. See the [workflow run](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) for details.`
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Both integration and acceptance tests require the connection to Snowflake (some
48
48
49
49
The preferred way of running particular tests locally is to create a config file `~/.snowflake/config`, with the following content.
50
50
51
-
```sh
51
+
```toml
52
52
[default]
53
53
account_name = "<your account name>"
54
54
organization_name = "<organization in which your account is located>"
@@ -60,7 +60,7 @@ host="<host of your account, e.g. organisation-account_name.snowflakecomputing.c
60
60
61
61
To be able to run all the tests you additionally need the second profile `[secondary_test_account]`:
62
62
63
-
```sh
63
+
```toml
64
64
[secondary_test_account]
65
65
account_name = "<your account name>"
66
66
organization_name = "<organization in which your account is located>"
@@ -70,6 +70,18 @@ role = "<your role on the secondary account>"
70
70
host="<host of your account, e.g. organisation-account_name2.snowflakecomputing.com>"
71
71
```
72
72
73
+
Some tests also require an Azure account profile `[azure_test_account]`. This is only used in non-prod environments for tests that require multiple Snowflake instances on different cloud providers (e.g. cross-cloud connection failover tests):
74
+
75
+
```toml
76
+
[azure_test_account]
77
+
account_name = "<your Azure account name>"
78
+
organization_name = "<organization in which your Azure account is located>"
79
+
user = "<your user on the Azure account>"
80
+
password = "<your password on the Azure account>"
81
+
role = "<your role on the Azure account>"
82
+
host="<host of your Azure account, e.g. organisation-azure_account_name.snowflakecomputing.com>"
83
+
```
84
+
73
85
**TIP**: check [how-can-i-get-my-organization-name](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/guides/authentication_methods#how-can-i-get-my-organization-name) and [how-can-i-get-my-account-name](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/guides/authentication_methods#how-can-i-get-my-account-name) sections in our guides if you have troubles setting the proper `organization_name` and `account_name`.
74
86
75
87
We are aware that not everyone has access to two different accounts, so the majority of tests can be run using just one account. The tests setup however, requires both profiles (`default` and `secondary_test_account`) to be present. You can use the same details for `secondary_test_account` as in the `default` one, if you don't plan to run tests requiring multiple accounts. The warning will be logged when setting up tests with just a single account.
@@ -133,7 +145,7 @@ To add the experiment:
133
145
- Add it to [`allExperiments`](pkg/provider/experimentalfeatures/experimental_features.go).
134
146
- Guard the logic with conditional statement like (example in the [user resource](pkg/resources/user.go)):
135
147
```go
136
-
if experimentalfeatures.IsExperimentEnabled(experimentalfeatures.UserEnableDefaultWorkloadIdentity, providerCtx.EnabledExperiments) {
148
+
if experimentalfeatures.IsExperimentEnabled(experimentalfeatures.UserEnableDefaultWorkloadIdentity, providerCtx.EnabledExperiments) {
0 commit comments