Mocking Aerospike in Go

Looking for ways to mock Aerospike APIs in unit testing, as per Go testing framework the functions to be mocked should be part of an interface, which means writing wrappers on top Aerospike Go client, is there any other way to test/mock the APIs?

Hi @yashmaxnet , At the moment there is no interface as a part of the Go client to help mock for testing. We may look into it for the future, but my experience has been that it’s best to avoid mocking databases and test directly against them. That will help you with later upgrades in both app logic and the actual database.

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.