Skip to content

Commit

Permalink
fix: Set the output when generating the contributing file. (#118)
Browse files Browse the repository at this point in the history
* fix: Set the output when generating the contributing file.

I thought it would figure that out from the template.

* fix: pubsub tests are colliding.

Tests cannot use a fixed cache name.
  • Loading branch information
schwern authored and cprice404 committed Mar 14, 2023
1 parent 1482da2 commit 8e49f48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
project_type: other
sdk_language: Go
template_file: CONTRIBUTING.template.md
output_file: CONTRIBUTING.md

test:
needs: [readme]
Expand Down
8 changes: 5 additions & 3 deletions momento/pub_sub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package momento
import (
"context"
"errors"
"os"
"testing"
"time"

Expand All @@ -11,6 +12,7 @@ import (
)

var client ScsClient
var cacheName = os.Getenv("TEST_CACHE_NAME")

func TestMain(m *testing.M) {
setup()
Expand Down Expand Up @@ -38,7 +40,7 @@ func setup() {
ctx := context.Background()
client = getClient()
err := client.CreateCache(ctx, &CreateCacheRequest{
CacheName: "test-cache",
CacheName: cacheName,
})
if err != nil {
var momentoErr MomentoError
Expand All @@ -64,7 +66,7 @@ func publishTopic(ctx context.Context, pubClient ScsClient, i int) {
}

_, err := pubClient.TopicPublish(ctx, &TopicPublishRequest{
CacheName: "test-cache",
CacheName: cacheName,
TopicName: "test-topic",
Value: topicVal,
})
Expand All @@ -79,7 +81,7 @@ func TestHappyPathPubSub(t *testing.T) {
cancelContext, cancelFunction := context.WithCancel(ctx)

sub, err := client.TopicSubscribe(ctx, &TopicSubscribeRequest{
CacheName: "test-cache",
CacheName: cacheName,
TopicName: "test-topic",
})
if err != nil {
Expand Down

0 comments on commit 8e49f48

Please sign in to comment.