diff --git a/base/database/testing.go b/base/database/testing.go index 265a16394..ce3e6df6e 100644 --- a/base/database/testing.go +++ b/base/database/testing.go @@ -175,16 +175,6 @@ func CheckAdvisoriesAccountDataNotified(t *testing.T, rhAccountID int, advisoryI } } -func CheckSystemUpdatesCount(t *testing.T, accountID int, systemID int64) []int { - var cnt []int - assert.NoError(t, Db.Table("system_package spkg"). - Select("json_array_length(spkg.update_data::json) as len"). - Where("spkg.update_data is not null"). - Where("spkg.system_id = ? AND spkg.rh_account_id = ? ", systemID, accountID). - Pluck("len", &cnt).Error) - return cnt -} - func CreateReportedAdvisories(reportedAdvisories []string, status []int) map[string]int { reportedAdvisoriesMap := make(map[string]int, len(reportedAdvisories)) for i, adv := range reportedAdvisories { diff --git a/evaluator/evaluate_test.go b/evaluator/evaluate_test.go index 84c6af6ba..a67cd1eea 100644 --- a/evaluator/evaluate_test.go +++ b/evaluator/evaluate_test.go @@ -135,14 +135,6 @@ func TestEvaluateYum(t *testing.T) { assert.Equal(t, 1, len(mockWriter.Messages)) } -func TestEvaluatePruneUpdates(t *testing.T) { - TestEvaluate(t) - count := database.CheckSystemUpdatesCount(t, rhAccountID, systemID) - for _, c := range count { - assert.LessOrEqual(t, c, 1, "All packages should only have single update stored") - } -} - func TestRun(t *testing.T) { configure() var nReaders int32