Commit 1732edd
Add Kotlin unit test infrastructure and CircleCI step (#159)
* chore: add Kotlin unit test dependencies to build.gradle
Add JUnit 4, Mockito, and OkHttp MockWebServer as test dependencies.
These are needed to run the existing ExponentialRetryInterceptorTest and
future interceptor tests.
Co-authored-by: Claude <claude@anthropic.com>
* chore: add Kotlin unit test infrastructure and CI step
- Add JUnit 4, Mockito, and OkHttp MockWebServer to android/build.gradle
test dependencies
- Add standalone test-runner project with Gradle wrapper for running
Kotlin unit tests independently of the React Native build
- Add kotlin-tests job to CircleCI using cimg/android executor
- Add smoke test to verify the test infrastructure works
- Wire kotlin-tests into the build workflow as a gate for build-package
This enables TDD for Android interceptor code without requiring a full
React Native app build.
Co-authored-by: Claude <claude@anthropic.com>
* fix: wrap MockWebServer and Response in use{} blocks in SmokeTest
Address CodeRabbit review: prevent resource leaks if assertions fail
by using Kotlin's use{} for automatic cleanup of MockWebServer and
Response objects.
Co-authored-by: Claude <claude@anthropic.com>
---------
Co-authored-by: Claude <claude@anthropic.com>1 parent dd42247 commit 1732edd
File tree
9 files changed
+427
-0
lines changed- .circleci
- android
- test-runner
- gradle/wrapper
- src/test/kotlin/com/mattermost/networkclient
9 files changed
+427
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
65 | 84 | | |
66 | 85 | | |
67 | 86 | | |
| |||
105 | 124 | | |
106 | 125 | | |
107 | 126 | | |
| 127 | + | |
108 | 128 | | |
109 | 129 | | |
110 | 130 | | |
111 | 131 | | |
112 | 132 | | |
113 | 133 | | |
| 134 | + | |
114 | 135 | | |
115 | 136 | | |
116 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments