Skip to content

Commit

Permalink
updated test formatting to make test suite pass when running tests an…
Browse files Browse the repository at this point in the history
…d 'make all' (#40)

Previously when trying to make emojivoto run locally, the test suit broke the make all script.
This PR fixes test formats to make the make build pass as well as pass tests run locally.

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
  • Loading branch information
franziskagoltz committed Apr 24, 2018
1 parent ded3859 commit 1d9c333
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions emojivoto/emojivoto-emoji-svc/api/api_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package api

import (
"context"
"testing"

"github.com/runconduit/conduit-examples/emojivoto/emojivoto-emoji-svc/emoji"
pb "github.com/runconduit/conduit-examples/emojivoto/emojivoto-emoji-svc/gen/proto"
"context"
)

func TestListAll(t *testing.T) {
Expand Down Expand Up @@ -80,7 +81,7 @@ func TestFindByShortcode(t *testing.T) {
}

if response.Emoji != nil {
t.Fatal("Expected to return nil for emoji, returned [%s]", response.Emoji)
t.Fatalf("Expected to return nil for emoji, returned [%s]", response.Emoji)
}
})

Expand Down
4 changes: 2 additions & 2 deletions emojivoto/emojivoto-voting-svc/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ func TestLeaderboard(t *testing.T) {
}

if response.Results[0].Shortcode != votedForTwice || response.Results[0].Votes != 2 {
t.Fatalf("Expected results to be [%s,%s], found: [%v]", votedForTwice, 2, response.Results)
t.Fatalf("Expected results to be [%v,%v], found: [%v]", votedForTwice, 2, response.Results)
}

if response.Results[1].Shortcode != votedForOnce || response.Results[1].Votes != 1 {
t.Fatalf("Expected results to be [%s,%s], found: [%v]", votedForOnce, 1, response.Results)
t.Fatalf("Expected results to be [%v,%v], found: [%v]", votedForOnce, 1, response.Results)
}
})
}
Expand Down

0 comments on commit 1d9c333

Please sign in to comment.