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
export ORACLE_PWD=oracle # Adjust your local SYS password
85
88
```
86
89
87
-
**Download utPLSQL release sources and utplsq-cli**
90
+
### Download utPLSQL release sources and utplsq-cli
88
91
89
-
_The below script is fetching latest release version from utPLSQL repository. Latest release version is used for self-testing._
92
+
The below script is fetching latest release version from utPLSQL repository. Latest release version is used for self-testing.
90
93
```bash
91
94
development/refresh_sources.sh
92
95
```
93
96
94
-
**Setup local database for utPLSQL development**
97
+
### Setup local database for utPLSQL development
98
+
95
99
```bash
96
100
development/install.sh
97
101
```
98
102
99
-
That's it! You now have the following:
103
+
### That's it
104
+
105
+
You now have the following:
100
106
- sources from `develop` branch of your fork of utPLSQL repository in `utPLSQL/ut3_latest_release` directory
101
107
- sources from `master` branch of utPLSQL/utPLSQL repository in `utPLSQL/ut3_latest_release` directory
102
108
- binaries of `utplsql-cli` in `utPLSQL/utPLSQL-cli` directory
@@ -106,27 +112,60 @@ That's it! You now have the following:
106
112
107
113
At any time, if you need to refresh your database, the below scripts might be helpful.
108
114
109
-
### Cleanup of utPLSQL installation in local database
115
+
## Running unit tests
116
+
117
+
Currently we use two forms of unit tests in our CI build:
118
+
- sql scripts as unit tests in the `old_tests` directory
119
+
- utPLSQL v3 unit tests in the `test` directory
120
+
121
+
Before you push any changes and create a pull request to the utPLSQL project repository, make sure that all of the tests are executing successfully in your local environment.
122
+
123
+
Every new functionality needs to be documented by unit tests that cover both happy-path scenarios as well as edge-cases and exception paths.
124
+
125
+
> **Important notice:**
126
+
> We do our best to keep utPLSQL covered with unit tests.
127
+
> Lack of sufficient unit testing is a perfect reason for PR to be rejected.
128
+
129
+
To suite of legacy unit tests execute:
130
+
```bash
131
+
development/env.sh
132
+
old_tests/runAll.sh
133
+
```
134
+
To run a full suite of unit tests execute:
135
+
```bash
136
+
development/env.sh
137
+
test/install_and_run_tests.sh
138
+
```
139
+
140
+
You can review the results of tests as well as see information about code coverage in `./old_tests/coverage.html, ./coverage.html` files.
141
+
142
+
143
+
## Cleanup of utPLSQL installation in local database
144
+
110
145
```bash
111
146
development/cleanup.sh
112
147
```
113
148
114
-
### Reinstalling utPLSQL development in `ut3` schema
149
+
## Reinstalling utPLSQL development in `ut3` schema
150
+
115
151
```bash
116
152
development/refresh_ut3.sh
117
153
```
118
154
119
-
Whenever a new version of utPLSQL or a new version of utPLSQL-cli is available, use `development/refresh_sources.sh` to refresh files in your local project folders.
155
+
## Refreshing after release
156
+
157
+
Whenever a new version of utPLSQL or a new version of utPLSQL-cli is available, use `development/refresh_sources.sh` to refresh files in your local project folders.
158
+
120
159
121
-
## Modules ##
160
+
## Modules
122
161
123
162
Below diagram gives a high-level overview of utPLSQL v3 modules and their dependencies.
124
163
Dependencies to `ut_util` are not shown as most of modules are depending on it.
We are using private docker images to test utPLSQL for our Travis CI builds. The following versions of Oracle Database are being used.
132
171
@@ -143,7 +182,7 @@ The build steps are simple if you already have some experience using Docker. You
143
182
144
183
> If you are new to Docker, you can start by reading the [Getting Started With Docker](https://docs.docker.com/engine/getstarted/) docs.
145
184
146
-
### Docker Build Notes ###
185
+
### Docker Build Notes
147
186
148
187
* You need to comment out the VOLUME line. This step is required, because volumes are not saved when using `docker commit` command.
149
188
* When the build process is complete, you will run the container to install the database. Once everything is set up and you see the message "DATABASE IS READY!", you may change the password and stop the running container. After the container is stopped, you can safely commit the container.
@@ -158,7 +197,7 @@ Variable | Description
158
197
---------|------------
159
198
**DOCKER_USER**<br />**DOCKER_PASSWORD** | _Your Docker Hub website credentials. They will be used to pull the private database images._
160
199
161
-
### SQLCL ###
200
+
### SQLCL
162
201
163
202
Our build configuration uses SQLCL to run the scripts, and you need to configure a few additional secure environment variables. After the first build, the downloaded file will be cached.
164
203
@@ -167,7 +206,7 @@ Variable | Description
167
206
**ORACLE_OTN_USER<br />ORACLE_OTN_PASSWORD** | _Your Oracle website credentials. They will be used to download SQLCL._
168
207
169
208
170
-
## New to GIT ##
209
+
## New to GIT
171
210
172
211
If you are new to GIT here are some links to help you with understanding how it works.
0 commit comments