mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 17:30:30 +00:00
Refactor to support multiple server instances in shared library
This commit is contained in:
@@ -15,14 +15,14 @@ import (
|
||||
// Request document with trailing slash like python cosmosdb client does.
|
||||
func Test_Documents_Read_Trailing_Slash(t *testing.T) {
|
||||
ts, _ := documents_InitializeDb(t)
|
||||
defer ts.Close()
|
||||
defer ts.Server.Close()
|
||||
|
||||
t.Run("Read doc with client that appends slash to path", func(t *testing.T) {
|
||||
resourceIdTemplate := "dbs/%s/colls/%s/docs/%s"
|
||||
path := fmt.Sprintf(resourceIdTemplate, testDatabaseName, testCollectionName, "12345")
|
||||
testUrl := ts.URL + "/" + path + "/"
|
||||
date := time.Now().Format(time.RFC1123)
|
||||
signature := authentication.GenerateSignature("GET", "docs", path, date, config.Config.AccountKey)
|
||||
signature := authentication.GenerateSignature("GET", "docs", path, date, config.DefaultAccountKey)
|
||||
httpClient := &http.Client{}
|
||||
req, _ := http.NewRequest("GET", testUrl, nil)
|
||||
req.Header.Add("x-ms-date", date)
|
||||
|
||||
Reference in New Issue
Block a user