feat: update README

This commit is contained in:
Urko 2023-03-08 12:17:48 +01:00
parent 7660cc57fd
commit d815b12719
1 changed files with 18 additions and 1 deletions

View File

@ -8,7 +8,7 @@ I had some trouble during TLS communication between both of my gRPC server and c
## TODO: ## TODO:
- [ ] Create intermediate authority to sign certificates on behalf CA to add more security. If intermediate is hacked then you can revoke from CA and generate new intermediates keeping CA isolated from beeing hacked. - [ ] Create intermediate authority to sign certificates on behalf CA to add more security. If intermediate is hacked then you can revoke from CA and generate new intermediates keeping CA isolated from beeing hacked.
- [ ] Complete tests - ~~[x] Complete tests~~
## Configuration ## Configuration
If you are on `dev` environment, like I've been doing, you must create `.env` file similar as `.env.example` in this repo: If you are on `dev` environment, like I've been doing, you must create `.env` file similar as `.env.example` in this repo:
@ -59,6 +59,23 @@ Then you can just run
go run main.go go run main.go
``` ```
## tests
Just simply run make command and watch coverage results on `cover.html` within `coverage`
```shell
make test-coverage
rm -rf coverage
mkdir coverage
go test -v -coverprofile coverage/cover.out ./...
=== RUN TestCredentialsFromKeyWithPasswd
--- PASS: TestCredentialsFromKeyWithPasswd (0.37s)
=== RUN TestCredentialsFromKeyWithPasswdError
--- PASS: TestCredentialsFromKeyWithPasswdError (0.46s)
PASS
coverage: 90.9% of statements
ok gitea.urkob.com/urko/go-grpc-certificate/pkg/credentials 0.839s coverage: 90.9% of statements
go tool cover -html coverage/cover.out -o coverage/cover.html
```
## goreportcard ## goreportcard
```bash ```bash
make goreportcard make goreportcard