Merged in feature/remove-mocks (pull request #202)
Feature/remove mocks * remove mocks * cleanup db migrations
This commit is contained in:
@@ -26,6 +26,7 @@ type Config struct {
|
||||
|
||||
// TestCollectorService tests the collector API endpoints.
|
||||
// Note: Query functionality has been removed. See remove_query_plan.md for details.
|
||||
// Note: MinimumTextVersion has been removed since text extraction is deprecated.
|
||||
func TestCollectorService(t *testing.T) {
|
||||
ctx := t.Context()
|
||||
|
||||
@@ -51,14 +52,12 @@ func TestCollectorService(t *testing.T) {
|
||||
assert.Equal(t, int32(0), collRes.JSON200.ActiveVersion)
|
||||
assert.Equal(t, int32(0), collRes.JSON200.LatestVersion)
|
||||
assert.Equal(t, int64(0), collRes.JSON200.MinimumCleanerVersion)
|
||||
assert.Equal(t, int64(0), collRes.JSON200.MinimumTextVersion)
|
||||
|
||||
av := int32(1)
|
||||
minVersion := int64(1000)
|
||||
uRes, err := client.SetCollectorByClientIdWithResponse(ctx, id, queryapi.CollectorSet{
|
||||
ActiveVersion: &av,
|
||||
MinimumCleanerVersion: &minVersion,
|
||||
MinimumTextVersion: &minVersion,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
test.AssertStatus(t, http.StatusOK, uRes.HTTPResponse)
|
||||
@@ -70,7 +69,6 @@ func TestCollectorService(t *testing.T) {
|
||||
assert.Equal(t, int32(1), collRes.JSON200.ActiveVersion)
|
||||
assert.Equal(t, int32(1), collRes.JSON200.LatestVersion)
|
||||
assert.Equal(t, minVersion, collRes.JSON200.MinimumCleanerVersion)
|
||||
assert.Equal(t, minVersion, collRes.JSON200.MinimumTextVersion)
|
||||
|
||||
test.AssertMessageBody(t, cfg, c.Dependencies.QueueURLs[test.ClientSyncRunnerName], regexp.MustCompile(`{"id":".+"}`))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user