Skip to content

Commit 53437af

Browse files
Merge pull request #81 from stewartbryson/stewart
README.md
2 parents dacb659 + 533245a commit 53437af

File tree

1 file changed

+54
-3
lines changed

1 file changed

+54
-3
lines changed

src/markdown/README.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
We introduced breaking changes in version `2.0.0` described below.
44

55
### SnowSQL Config File
6-
Instead of continuing to use plugin DSL or Gradle properties to provide Snowflake authentication, I made the
6+
Instead of continuing to use plugin DSL or Gradle properties to provide Snowflake authentication, we made the
77
decision to switch to using the SnowSQL config moving forward.
88
This was inspired by the [Snowflake Developer CLI](https://github.com/Snowflake-Labs/snowcli) project, and it seems to
99
be a reasonable standard moving forward.
@@ -210,7 +210,7 @@ BUILD SUCCESSFUL in 624ms
210210

211211
This project uses the [S3 Gradle build cache plugin](https://github.com/burrunan/gradle-s3-build-cache)
212212
and we are very happy with it.
213-
Check the [Gradle settings file](setting.gradle) for an implementation example.
213+
Check the [Gradle settings file](settings.gradle) for an implementation example.
214214

215215
# Testing
216216
Gradle
@@ -279,7 +279,20 @@ All unit tests in either `src/test/java` (written using JUnit or something else)
279279
we automatically run whenever the `test` or `build` task is executed.
280280

281281
```shell
282-
./gradlew build
282+
❯ ./gradlew build
283+
284+
> Task :test
285+
286+
SampleTest
287+
288+
Test adding 1 and 2 PASSED
289+
Test adding 3 and 4 PASSED
290+
291+
SUCCESS: Executed 2 tests in 487ms
292+
293+
294+
BUILD SUCCESSFUL in 1s
295+
9 actionable tasks: 5 executed, 4 up-to-date
283296
```
284297

285298
All Gradle testing tasks are automatically incremental and cacheable, and would be avoided if executed again without changes to the code in either the source or the spec.
@@ -352,6 +365,44 @@ class SnowflakeSampleTest extends SnowflakeSpec {
352365
The `selectSingleValue` method returns the first column from the first row in a `SELECT` statement,
353366
so it's perfect for testing a function. And of course, this executes against Snowflake in real time.
354367

368+
```shell
369+
❯ ./gradlew functionalTest
370+
371+
> Task :test
372+
373+
SampleTest
374+
375+
Test adding 1 and 2 PASSED
376+
Test adding 3 and 4 PASSED
377+
378+
SUCCESS: Executed 2 tests in 462ms
379+
380+
381+
> Task :snowflakeJvm
382+
Using snowsql config file: /Users/stewartbryson/.snowsql/config
383+
File java-testing-0.1.0-all.jar: UPLOADED
384+
Deploying ==>
385+
CREATE OR REPLACE function add_numbers (a integer, b integer)
386+
returns string
387+
language JAVA
388+
handler = 'Sample.addNum'
389+
imports = ('@upload/libs/java-testing-0.1.0-all.jar')
390+
391+
392+
> Task :functionalTest
393+
394+
SnowflakeSampleTest
395+
396+
Test ADD_NUMBERS() function with 1 and 2 PASSED
397+
Test ADD_NUMBERS() function with 3 and 4 PASSED
398+
399+
SUCCESS: Executed 2 tests in 3.4s
400+
401+
402+
BUILD SUCCESSFUL in 9s
403+
11 actionable tasks: 7 executed, 4 up-to-date
404+
```
405+
355406
### Testing with Ephemeral Database Clones
356407
Running functional tests using static Snowflake databases is boring, especially considering
357408
the [zero-copy cloning](https://docs.snowflake.com/en/user-guide/object-clone.html#cloning-considerations) functionality

0 commit comments

Comments
 (0)