Documentation ¶
Index ¶
- Constants
- type Factory
- func (f Factory) RunAgentClientTests(t *testing.T)
- func (f Factory) TestCreateMap(t *testing.T)
- func (f Factory) TestCreateMapHandlesWrongInitArgs(t *testing.T)
- func (f Factory) TestCreateMapOK(t *testing.T)
- func (f Factory) TestCreateMapWithBadRefs(t *testing.T)
- func (f Factory) TestCreateMapWithRefs(t *testing.T)
- func (f Factory) TestCreateSegment(t *testing.T)
- func (f Factory) TestCreateSegmentHandlesWrongAction(t *testing.T)
- func (f Factory) TestCreateSegmentHandlesWrongActionArgs(t *testing.T)
- func (f Factory) TestCreateSegmentHandlesWrongLinkHash(t *testing.T)
- func (f Factory) TestCreateSegmentHandlesWrongProcess(t *testing.T)
- func (f Factory) TestCreateSegmentOK(t *testing.T)
- func (f Factory) TestCreateSegmentWithBadRefs(t *testing.T)
- func (f Factory) TestCreateSegmentWithRefs(t *testing.T)
- func (f Factory) TestFindSegments(t *testing.T)
- func (f Factory) TestFindSegmentsLimit(t *testing.T)
- func (f Factory) TestFindSegmentsLinkHashes(t *testing.T)
- func (f Factory) TestFindSegmentsMapIDs(t *testing.T)
- func (f Factory) TestFindSegmentsNoMatch(t *testing.T)
- func (f Factory) TestFindSegmentsNotFound(t *testing.T)
- func (f Factory) TestFindSegmentsOK(t *testing.T)
- func (f Factory) TestFindSegmentsTags(t *testing.T)
- func (f Factory) TestGetInfo(t *testing.T)
- func (f Factory) TestGetInfoOK(t *testing.T)
- func (f Factory) TestGetMapIds(t *testing.T)
- func (f Factory) TestGetMapIdsLimit(t *testing.T)
- func (f Factory) TestGetMapIdsNoMatch(t *testing.T)
- func (f Factory) TestGetMapIdsOK(t *testing.T)
- func (f Factory) TestGetProcess(t *testing.T)
- func (f Factory) TestGetProcessNotFound(t *testing.T)
- func (f Factory) TestGetProcessOK(t *testing.T)
- func (f Factory) TestGetProcesses(t *testing.T)
- func (f Factory) TestGetProcessesOK(t *testing.T)
- func (f Factory) TestGetSegment(t *testing.T)
- func (f Factory) TestGetSegmentNotFound(t *testing.T)
- func (f Factory) TestGetSegmentOK(t *testing.T)
- func (f Factory) TestUploadProcess(t *testing.T)
- func (f Factory) TestUploadProcessOK(t *testing.T)
Constants ¶
const StoreURL = "http://store:5000"
StoreURL is used to connect to the agent underlying store.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct { NewMock func(t *testing.T, agentURL string) *http.Server NewClient func(agentURL string) (client.AgentClient, error) Client client.AgentClient }
Factory wraps functions to create a client and a mock agent. After its creation, the client is stored in the factory to avoid re-creating it in every test.
func (Factory) RunAgentClientTests ¶
RunAgentClientTests runs the test suite for an agent client.
func (Factory) TestCreateMap ¶
TestCreateMap tests what happens when creating a map with various inputs.
func (Factory) TestCreateMapHandlesWrongInitArgs ¶
TestCreateMapHandlesWrongInitArgs tests the client's ability to handle a CreateMap request when the provided arguments do not match those of the 'init' function.
func (Factory) TestCreateMapOK ¶
TestCreateMapOK tests the client's ability to handle a CreateMap request.
func (Factory) TestCreateMapWithBadRefs ¶
TestCreateMapWithBadRefs tests the client's ability to handle a CreateMap request when the provided reference is ill formatted.
func (Factory) TestCreateMapWithRefs ¶
TestCreateMapWithRefs tests the client's ability to handle a CreateMap request when one or multiple references are passed.
func (Factory) TestCreateSegment ¶
TestCreateSegment tests what happens when creating a link with various inputs.
func (Factory) TestCreateSegmentHandlesWrongAction ¶
TestCreateSegmentHandlesWrongAction tests the client's ability to handle a CreateSegment request when the provided action does not exist.
func (Factory) TestCreateSegmentHandlesWrongActionArgs ¶
TestCreateSegmentHandlesWrongActionArgs tests the client's ability to handle a CreateSegment request when the provided action's arguments do not match the actual ones.
func (Factory) TestCreateSegmentHandlesWrongLinkHash ¶
TestCreateSegmentHandlesWrongLinkHash tests the client's ability to handle a CreateSegment request when the provided parent's linkHash does not exist.
func (Factory) TestCreateSegmentHandlesWrongProcess ¶
TestCreateSegmentHandlesWrongProcess tests the client's ability to handle a CreateSegment request when the provided process does not exist.
func (Factory) TestCreateSegmentOK ¶
TestCreateSegmentOK tests the client's ability to handle a CreateSegment request.
func (Factory) TestCreateSegmentWithBadRefs ¶
TestCreateSegmentWithBadRefs tests the client's ability to handle a CreateSegment request when a reference is passed.
func (Factory) TestCreateSegmentWithRefs ¶
TestCreateSegmentWithRefs tests the client's ability to handle a CreateSegment request when a reference is passed.
func (Factory) TestFindSegments ¶
TestFindSegments tests what happens when finding segments with various filters.
func (Factory) TestFindSegmentsLimit ¶
TestFindSegmentsLimit tests the client's ability to handle a FindSegment request when a limit is set in the filter, and when this liit is set to -1
func (Factory) TestFindSegmentsLinkHashes ¶
TestFindSegmentsLinkHashes tests the client's ability to handle a FindSegment request when LinkHashes are set in the filter.
func (Factory) TestFindSegmentsMapIDs ¶
TestFindSegmentsMapIDs tests the client's ability to handle a FindSegment request when a map ID is set in the filter.
func (Factory) TestFindSegmentsNoMatch ¶
TestFindSegmentsNoMatch tests the client's ability to handle a FindSegment request when no segment is found.
func (Factory) TestFindSegmentsNotFound ¶
TestFindSegmentsNotFound tests the client's ability to handle a FindSegment request when no segment is found.
func (Factory) TestFindSegmentsOK ¶
TestFindSegmentsOK tests the client's ability to handle a FindSegment request.
func (Factory) TestFindSegmentsTags ¶
TestFindSegmentsTags tests the client's ability to handle a FindSegment request when tags are set in the filter.
func (Factory) TestGetInfo ¶
TestGetInfo tests what happens when getting an agent's infos.
func (Factory) TestGetInfoOK ¶
TestGetInfoOK tests the client's ability to handle a GetInfo request.
func (Factory) TestGetMapIds ¶
TestGetMapIds tests what happens when finding map ids with varisou filters.
func (Factory) TestGetMapIdsLimit ¶
TestGetMapIdsLimit tests the client's ability to handle a GetMapIds request when a limit is set in the filter and when the limit is set to -1
func (Factory) TestGetMapIdsNoMatch ¶
TestGetMapIdsNoMatch tests the client's ability to handle a GetMapIds request when no mapID is found.
func (Factory) TestGetMapIdsOK ¶
TestGetMapIdsOK tests the client's ability to handle a GetMapIds request.
func (Factory) TestGetProcess ¶
TestGetProcess tests what happens when getting informations about a process.
func (Factory) TestGetProcessNotFound ¶
TestGetProcessNotFound tests the client's ability to handle a FindSegment request when no process is found.
func (Factory) TestGetProcessOK ¶
TestGetProcessOK tests the client's ability to handle a GetProcess request.
func (Factory) TestGetProcesses ¶
TestGetProcesses tests what happens whengetting all the processes from an agent.
func (Factory) TestGetProcessesOK ¶
TestGetProcessesOK tests the client's ability to handle a GetProcesses request.
func (Factory) TestGetSegment ¶
TestGetSegment tests what happens when getting a segment.
func (Factory) TestGetSegmentNotFound ¶
TestGetSegmentNotFound tests the client's ability to handle a GetSegment request when the queried linkHash does not exist.
func (Factory) TestGetSegmentOK ¶
TestGetSegmentOK tests the client's ability to handle a GetSegment request.
func (Factory) TestUploadProcess ¶ added in v0.3.0
TestUploadProcess tests what happens when uploading a process with various inputs.
func (Factory) TestUploadProcessOK ¶ added in v0.3.0
TestUploadProcessOK tests the client's ability to handle a CreateMap request.