Skip to content

Commit

Permalink
fix: remove tests package and move the test to the relevant package
Browse files Browse the repository at this point in the history
  • Loading branch information
poppoerika committed Jan 28, 2022
1 parent 6182f15 commit 5fe74f5
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tests
package momento

import (
"bytes"
Expand All @@ -9,7 +9,6 @@ import (

"github.com/google/uuid"
"github.com/momentohq/client-sdk-go/internal/scserrors"
"github.com/momentohq/client-sdk-go/momento"
"github.com/momentohq/client-sdk-go/momento/requests"
"github.com/momentohq/client-sdk-go/momento/responses"
)
Expand All @@ -20,7 +19,7 @@ var TestCacheName = os.Getenv("TEST_CACHE_NAME")
const BadToken = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJpbnRlZ3JhdGlvbiIsImNwIjoiY29udHJvbC5jZWxsLWFscGhhLWRldi5wcmVwcm9kLmEubW9tZW50b2hxLmNvbSIsImMiOiJjYWNoZS5jZWxsLWFscGhhLWRldi5wcmVwcm9kLmEubW9tZW50b2hxLmNvbSJ9.gdghdjjfjyehhdkkkskskmmls76573jnajhjjjhjdhnndy"
const DefaultTtlSeconds = 60

func setUp(t *testing.T) (*momento.ScsClient, error) {
func setUp(t *testing.T) (*ScsClient, error) {
if TestAuthToken == "" {
t.Error("Integration tests require TEST_AUTH_TOKEN env var.")
} else if TestCacheName == "" {
Expand All @@ -30,7 +29,7 @@ func setUp(t *testing.T) (*momento.ScsClient, error) {
AuthToken: TestAuthToken,
DefaultTtlSeconds: DefaultTtlSeconds,
}
client, err := momento.SimpleCacheClient(simpleCacheClientRequest)
client, err := SimpleCacheClient(simpleCacheClientRequest)
if err != nil {
return nil, err
} else {
Expand All @@ -48,7 +47,7 @@ func setUp(t *testing.T) (*momento.ScsClient, error) {
return nil, nil
}

func cleanUp(client *momento.ScsClient) {
func cleanUp(client *ScsClient) {
err := client.Close()
if err != nil {
log.Fatal(err.Error())
Expand Down

0 comments on commit 5fe74f5

Please sign in to comment.