Skip to content

Commit

Permalink
fix(profileID): Properly decode example profileID for tests that use it
Browse files Browse the repository at this point in the history
  • Loading branch information
dustmop committed Mar 6, 2020
1 parent 924157c commit 4f55c6c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion base/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var (

testPeerProfile = &profile.Profile{
Peername: "peer",
ID: "QmZePf5LeXow3RW5U1AgEiNbW46YnRGhZ7HPvm1UmPFPwt",
ID: profile.IDB58MustDecode("QmZePf5LeXow3RW5U1AgEiNbW46YnRGhZ7HPvm1UmPFPwt"),
}

devNull = ioes.NewDiscardIOStreams()
Expand Down
2 changes: 1 addition & 1 deletion base/dataset_prepare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestInferValues(t *testing.T) {
if err = InferValues(pro, ds); err != nil {
t.Error(err)
}
expectAuthorID := `9tmwSYB7dPRUXaEwJRNgzb6NbwPYNXrYyeahyHPAUqrTYd3Z6bVS9z1mCDsRmvb`
expectAuthorID := `QmZePf5LeXow3RW5U1AgEiNbW46YnRGhZ7HPvm1UmPFPwt`
if diff := cmp.Diff(expectAuthorID, ds.Commit.Author.ID); diff != "" {
t.Errorf("result mismatch (-want +got):\n%s", diff)
}
Expand Down
2 changes: 1 addition & 1 deletion base/dataset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func TestRawDatasetRefs(t *testing.T) {
t.Fatal(err)
}
expect := `0 Peername: peer
ProfileID: 9tmwSYB7dPRUXaEwJRNgzb6NbwPYNXrYyeahyHPAUqrTYd3Z6bVS9z1mCDsRmvb
ProfileID: QmZePf5LeXow3RW5U1AgEiNbW46YnRGhZ7HPvm1UmPFPwt
Name: cities
Path: /map/QmbU34XVYPGeEGjJ93rBm4Nac2g4hBYFouDnu9p9psccDB
FSIPath:
Expand Down
6 changes: 3 additions & 3 deletions base/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestDatasetLog(t *testing.T) {
{
Username: "peer",
Name: "cities",
ProfileID: "9tmwSYB7dPRUXaEwJRNgzb6NbwPYNXrYyeahyHPAUqrTYd3Z6bVS9z1mCDsRmvb",
ProfileID: "QmZePf5LeXow3RW5U1AgEiNbW46YnRGhZ7HPvm1UmPFPwt",
// TODO (b5) - use constant time to make timestamp & path comparable
CommitTitle: "initial commit",
CommitMessage: "created dataset",
Expand Down Expand Up @@ -122,15 +122,15 @@ func TestConstructDatasetLogFromHistory(t *testing.T) {
Username: "peer",
CommitTitle: "initial commit",
BodySize: 0x9b,
ProfileID: "9tmwSYB7dPRUXaEwJRNgzb6NbwPYNXrYyeahyHPAUqrTYd3Z6bVS9z1mCDsRmvb",
ProfileID: "QmZePf5LeXow3RW5U1AgEiNbW46YnRGhZ7HPvm1UmPFPwt",
Name: "cities",
Path: "/map/QmaTfAQNUKqtPe2EUcCELJNprRLJWswsVPHHNhiKgZoTMR",
},
{
Username: "peer",
CommitTitle: "initial commit",
BodySize: 0x9b,
ProfileID: "9tmwSYB7dPRUXaEwJRNgzb6NbwPYNXrYyeahyHPAUqrTYd3Z6bVS9z1mCDsRmvb",
ProfileID: "QmZePf5LeXow3RW5U1AgEiNbW46YnRGhZ7HPvm1UmPFPwt",
Name: "cities",
},
}
Expand Down

0 comments on commit 4f55c6c

Please sign in to comment.