Merge pull request #9658 from ch33hau/fix-contribution-doc
Fix curl commands in contributing docpull/9663/head
commit
5e08187cb6
|
@ -15,20 +15,20 @@ If you have never written a bug report before, or if you want to brush up on you
|
|||
Test cases should be in the form of `curl` commands. For example:
|
||||
```bash
|
||||
# create database
|
||||
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
|
||||
curl -X POST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
|
||||
|
||||
# create retention policy
|
||||
curl -G http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY myrp ON mydb DURATION 365d REPLICATION 1 DEFAULT"
|
||||
curl -X POST http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY myrp ON mydb DURATION 365d REPLICATION 1 DEFAULT"
|
||||
|
||||
# write data
|
||||
curl -X POST http://localhost:8086/write --data-urlencode "db=mydb" --data-binary "cpu,region=useast,host=server_1,service=redis value=61"
|
||||
curl -X POST http://localhost:8086/write?db=mydb --data-binary "cpu,region=useast,host=server_1,service=redis value=61"
|
||||
|
||||
# Delete a Measurement
|
||||
curl -G http://localhost:8086/query --data-urlencode 'db=mydb' --data-urlencode 'q=DROP MEASUREMENT cpu'
|
||||
curl -X POST http://localhost:8086/query --data-urlencode 'db=mydb' --data-urlencode 'q=DROP MEASUREMENT cpu'
|
||||
|
||||
# Query the Measurement
|
||||
# Bug: expected it to return no data, but data comes back.
|
||||
curl -G http://localhost:8086/query --data-urlencode 'db=mydb' --data-urlencode 'q=SELECT * from cpu'
|
||||
curl -X POST http://localhost:8086/query --data-urlencode 'db=mydb' --data-urlencode 'q=SELECT * from cpu'
|
||||
```
|
||||
**If you don't include a clear test case like this, your issue may not be investigated, and may even be closed**. If writing the data is too difficult, please zip up your data directory and include a link to it in your bug report.
|
||||
|
||||
|
|
Loading…
Reference in New Issue