-
Notifications
You must be signed in to change notification settings - Fork 66
Test WalletStore queries #1108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Test WalletStore queries #1108
Conversation
|
||
Expect(mockDB.ExpectationsWereMet()).To(Succeed()) | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(actualWalletIDs[0]).To(Equal(output)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consistof
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
Expect(mockDB.ExpectationsWereMet()).To(Succeed()) | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(exists).To(Equal(true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to(betrue())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
func mockWalletStore(db *sql.DB) *common.WalletStore { | ||
store, _ := common.NewWalletStore(db, db, common.TableNames{ | ||
Wallets: "WALLETS", | ||
}, sqlite.NewConditionInterpreter()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postgres
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
actually changed this to
func mockWalletStore(db *sql.DB) *WalletStore {
which directs to postgres.WalletStore.
Also moved the tests to sqlite and postgres dirs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't understand the comment before. Now fixed.
done.
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
Signed-off-by: ADIR <[email protected]>
bb3fbdb
to
87ff6f9
Compare
Signed-off-by: ADIR <[email protected]>
"github.com/onsi/gomega" | ||
) | ||
|
||
type storeConstructor func(*sql.DB) *WalletStore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's going to create conflicts when you push your other PR's. you will have clashing type names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: ADIR <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.