mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 15:10:54 +00:00
Feature: Add mock testing to ZB (#569)
* Adds mock testing to ZB
* STEALS improved time validation code from the original STOLEN validation code :D
* Mini fixes from review
* happy fun comment stealing
* Moves the loop checker earlier to ensure no double appendages
* Fixes sneaky test
* Fixes the important part where mock tests work instead of live tests
* Skips authenticated endpoints for mock testing.
* lint
* Updates candle wrapper functions to respect design
* basic linting fix
* Reverts configtest.json, updates readme to be way better, adds coverage to validateCandlesRequest
* Tiniest grammatical fix
* Fixes more outdated code references
* Closing out a high
* Fixes spacing
* Replaces all instances of 4 spaces in tmpl files with a tab
* fixes spacing and tab related readme issues once and for all 🤞
* tidy
* indentation violation identification situation
This commit is contained in:
@@ -44,18 +44,18 @@ HTMLScrapingData is a struct which contains the necessary information to scrape
|
||||
func TestAdd(t *testing.T) {
|
||||
t.Parallel()
|
||||
data := HTMLScrapingData{TokenData: "h1",
|
||||
Key: "id",
|
||||
Val: "revision-history",
|
||||
TokenDataEnd: "table",
|
||||
TextTokenData: "td",
|
||||
DateFormat: "2006/01/02",
|
||||
RegExp: "^20(\\d){2}/(\\d){2}/(\\d){2}$",
|
||||
CheckString: "2019/11/15",
|
||||
Path: "https://docs.gemini.com/rest-api/#revision-history"}
|
||||
Key: "id",
|
||||
Val: "revision-history",
|
||||
TokenDataEnd: "table",
|
||||
TextTokenData: "td",
|
||||
DateFormat: "2006/01/02",
|
||||
RegExp: "^20(\\d){2}/(\\d){2}/(\\d){2}$",
|
||||
CheckString: "2019/11/15",
|
||||
Path: "https://docs.gemini.com/rest-api/#revision-history"}
|
||||
err := Add("Gemini", htmlScrape, data.Path, data, true, &testConfigData)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestAdd(t *testing.T) {
|
||||
err := Add("Lbank", github, fmt.Sprintf(githubPath, data.Repo), data, false, &configData)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#### This tool allows for the generation of new documentation through templating
|
||||
|
||||
From the `gocryptotrader/cmd/documentation/` folder, using the go command: **go run documentation.go** this will auto-generate and regenerate documentation across the **GoCryptoTrader** code base.
|
||||
From the `gocryptotrader/cmd/documentation/` folder, using the go command: **go run documentation.go** this will auto-generate and regenerate documentation across the **GoCryptoTrader** code base.
|
||||
>Using the -v command will, ie **go run documentation.go -v** put the tool into verbose mode allowing you to see what is happening with a little more depth.
|
||||
|
||||
Be aware, this tool will:
|
||||
@@ -18,19 +18,19 @@ Be aware, this tool will:
|
||||
|
||||
```json
|
||||
{
|
||||
"githubRepo": "https://api.github.com/repos/thrasher-corp/gocryptotrader", This is your current repo
|
||||
"exclusionList": { This allows for excluded directories and files
|
||||
"Files": null,
|
||||
"Directories": [
|
||||
"_templates",
|
||||
".git",
|
||||
"web"
|
||||
]
|
||||
},
|
||||
"rootReadmeActive": true, allows a root directory README.md
|
||||
"licenseFileActive": true, allows for a license file to be generated
|
||||
"contributorFileActive": true, fetches a new contributor list
|
||||
"referencePathToRepo": "../../"
|
||||
"githubRepo": "https://api.github.com/repos/thrasher-corp/gocryptotrader", This is your current repo
|
||||
"exclusionList": { This allows for excluded directories and files
|
||||
"Files": null,
|
||||
"Directories": [
|
||||
"_templates",
|
||||
".git",
|
||||
"web"
|
||||
]
|
||||
},
|
||||
"rootReadmeActive": true, allows a root directory README.md
|
||||
"licenseFileActive": true, allows for a license file to be generated
|
||||
"contributorFileActive": true, fetches a new contributor list
|
||||
"referencePathToRepo": "../../"
|
||||
}
|
||||
```
|
||||
### Template example
|
||||
|
||||
Reference in New Issue
Block a user