Skip to content

Commit

Permalink
Added more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rv404674 committed Aug 21, 2020
1 parent e818b29 commit cd8922c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions commands_benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
telnet localhost 11211
get https://goRubu/MTAyMTk=
```
this will give the original url, to corresponding to the shorten url.
If you get nothing, it means there is not entry in memcached.
This will give the original url, corresponding to the shortened url.

2. To check Indexed in Mongo.

2. To check Indexes in Mongo.
```bash
db.collection.getIndexes()
```
Expand All @@ -19,16 +19,19 @@ go test ./tests -v
go test ./tests -v - cover
```

**NOTE** - Normally these two commands work, but with "go 1.13" they are not working.
Hence use these
**NOTE** - Normally these two commands work, but with "go 1.13", second command (the cover one) is not working.

I have integrated [coveralls.io](https://coveralls.io/) with goRubu.
or you can use these.

```bash
go test ./... -v -coverpkg=./... -coverprofile=cover.txt
go tool cover -html=cover.txt -o cover.html
```

## Docker

1. This will give the logs of that container.
1. This will give the logs of a particular container.
```bash
docker logs container_id
```
Expand Down
1 change: 1 addition & 0 deletions tests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

// main test function. Checks both url creation and url redirection
// should start with "Test" and latter name should start with capital letter
// TODO: Increase the text coverage. Test for negative cases as well.

func commonUtility(input string, wait string) string {
shortenedUrl := service.CreateShortenedUrl(input)
Expand Down

0 comments on commit cd8922c

Please sign in to comment.