Skip to content

Commit b30cc58

Browse files
committed
fix tests
1 parent 9fe7107 commit b30cc58

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

escrow/free_call_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (suite *FreeCallServiceSuite) TestFreeCallUserTransactionTestLock() {
8888
assert.NotNil(suite.T(), transactionA)
8989
transactionB, errB := suite.service.StartFreeCallUserTransaction(payment)
9090
assert.Nil(suite.T(), transactionB)
91-
assert.Equal(suite.T(), errB.Error(), "another transaction on this user: {ID:user2/ExampleOrganizationId/ExampleServiceId/ewAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=} is in progress")
91+
assert.Equal(suite.T(), errB.Error(), "another transaction on this user: {ID:user2/YOUR_ORG_ID/YOUR_SERVICE_ID/ewAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=} is in progress")
9292
}
9393

9494
func (suite *FreeCallServiceSuite) TestListFreeCallUsers() {

escrow/payment_handler_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ func Test_paymentChannelPaymentHandler_PublishChannelStats(t *testing.T) {
158158
}},
159159

160160
{name: "", wantErr: nil, setupFunc: func() {
161+
config.Vip().Set(config.OrganizationId, "ExampleOrganizationId")
162+
config.Vip().Set(config.ServiceId, "ExampleServiceId")
161163
config.Vip().Set(config.MeteringEnabled, true)
162164
config.Vip().Set(config.PvtKeyForMetering, "063C00D18E147F4F734846E47FE6598FC7A6D56307862F7EDC92B9F43CC27EDD")
163165
config.Vip().Set(config.MeteringEndPoint, "https://bkq2d3zjl4.execute-api.eu-west-1.amazonaws.com/main")

token/jwt_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func Test_customJWTokenClaimsImpl_CreateToken(t *testing.T) {
2626
assert.Nil(t, err)
2727
err = tokenImpl.VerifyToken(token, "any struct")
2828
assert.Equal(t, "token has invalid claims: token is expired", err.Error())
29-
3029
}
3130

3231
func Test_customJWTokenClaimsImpl_checkJwtTokenClaims(t *testing.T) {
@@ -41,8 +40,8 @@ func Test_customJWTokenClaimsImpl_checkJwtTokenClaims(t *testing.T) {
4140
assert.Equal(t, "payload any struct used to generate the Token doesnt match expected values", err.Error())
4241
config.Vip().Set(config.OrganizationId, "differentOrganization")
4342
err = tokenImpl.VerifyToken(token, "any struct")
44-
assert.Equal(t, "organization ExampleOrganizationId is not associated with this Daemon", err.Error())
45-
config.Vip().Set(config.OrganizationId, "ExampleOrganizationId")
43+
assert.Equal(t, "organization YOUR_ORG_ID is not associated with this Daemon", err.Error())
44+
config.Vip().Set(config.OrganizationId, "YOUR_ORG_ID")
4645
tokenImpl2 := &customJWTokenServiceImpl{
4746
getGroupId: func() string {
4847
return "GroupID2"

0 commit comments

Comments
 (0)