Skip to content
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

Use mock assignment logger and verify it is being called (FF-1450) #30

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

leoromanovsky
Copy link
Member

@leoromanovsky leoromanovsky commented Jan 12, 2024

added unit test to verify issue

--- FAIL: Test_e2e (2.06s)
    /Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141: 
        	Error Trace:	/Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141
        	Error:      	Should have called with given arguments
        	Test:       	Test_e2e
        	Messages:   	Expected "LogAssignment" to have been called with:
        	            	[mock.Anything]
        	            	but no actual calls happened
    /Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141: 
        	Error Trace:	/Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141
        	Error:      	Should have called with given arguments
        	Test:       	Test_e2e
        	Messages:   	Expected "LogAssignment" to have been called with:
        	            	[mock.Anything]
        	            	but no actual calls happened
    /Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141: 
        	Error Trace:	/Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141
        	Error:      	Should have called with given arguments
        	Test:       	Test_e2e
        	Messages:   	Expected "LogAssignment" to have been called with:
        	            	[mock.Anything]
        	            	but no actual calls happened
    /Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141: 
        	Error Trace:	/Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141
        	Error:      	Should have called with given arguments
        	Test:       	Test_e2e
        	Messages:   	Expected "LogAssignment" to have been called with:
        	            	[mock.Anything]
        	            	but no actual calls happened
    /Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141: 
        	Error Trace:	/Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141
        	Error:      	Should have called with given arguments
        	Test:       	Test_e2e
        	Messages:   	Expected "LogAssignment" to have been called with:
        	            	[mock.Anything]
        	            	but no actual calls happened
    /Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141: 
        	Error Trace:	/Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141
        	Error:      	Should have called with given arguments
        	Test:       	Test_e2e
        	Messages:   	Expected "LogAssignment" to have been called with:
        	            	[mock.Anything]
        	            	but no actual calls happened
    /Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141: 
        	Error Trace:	/Users/leo/src/golang-sdk/eppoclient/eppoclient_e2e_test.go:141
        	Error:      	Should have called with given arguments
        	Test:       	Test_e2e
        	Messages:   	Expected "LogAssignment" to have been called with:
        	            	[mock.Anything]
        	            	but no actual calls happened
FAIL
FAIL	github.com/Eppo-exp/golang-sdk/v2/eppoclient	2.364s
FAIL

resolution

Use passed logger from Config object.

@leoromanovsky leoromanovsky merged commit 6a66776 into main Jan 12, 2024
2 checks passed
@leoromanovsky leoromanovsky deleted the lr/ff-1450/assignment-logger-mock branch January 12, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants