-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Performance update, remove useless dependencies, improve cache speed * Remove useless env var and optimise imports * Update makefile for travis * Fix configuration pass and linter * Add tests * Enhance tests * Tests and typo enhancement * Lint and add headers feature in key * Update documentation * Fix documentation * Remove duplicated line * Improve doc, thanks to @oxodao
- Loading branch information
Showing
24 changed files
with
838 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package providers | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
|
||
"github.com/darkweak/souin/errors" | ||
"github.com/darkweak/souin/configuration" | ||
) | ||
|
||
const MEMORYVALUE = "My first data" | ||
|
||
func TestIShouldBeAbleToReadAndWriteDataInMemory(t *testing.T) { | ||
client := MemoryConnectionFactory(configuration.GetConfig()) | ||
err := client.Set("Test", []byte(MEMORYVALUE)) | ||
if err != nil { | ||
errors.GenerateError(t, "Impossible to set memory variable") | ||
} | ||
res, err := client.Get("Test") | ||
if err != nil { | ||
errors.GenerateError(t, "Retrieving data from memory") | ||
} | ||
if MEMORYVALUE != string(res) { | ||
errors.GenerateError(t, fmt.Sprintf("%s not corresponding to %s", res, MEMORYVALUE)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.