Skip to content

Commit

Permalink
Merge pull request #260 from geosolutions-it/issue-plpgsql-unit-test
Browse files Browse the repository at this point in the history
fix incorrect values for assert and add assert on count of anomalies …
  • Loading branch information
chpicone authored Feb 5, 2021
2 parents 3cddfce + 1df1bac commit 5f8a3a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion database/unittest.sql
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ BEGIN
"SORGENTI_INRETI": 838,
"POTAB_INRETI": 99,
"ADDUT_INRETI": 820,
"ACCUMULI_INRETI": 910,
"ACCUMULI_INRETI": 914,
"ACCUMULI_INADD": 784,
"DEPURATO_INCOLL": 43,
"SCARICATO_INFOG": 1074,
Expand Down Expand Up @@ -1118,6 +1118,11 @@ DECLARE
BEGIN
select count(0) into v_count from dbiait_analysis.ACCUMULI_INRETI;
perform test_assertTrue('count TAB ACCUMULI_INRETI, expected ' || v_expected || ' but found ' || v_count, v_count = v_expected );

v_expected := 3;
select count(0) into v_count from DBIAIT_ANALYSIS.LOG_STANDALONE WHERE alg_name ='ACCUMULI_INRETI';
perform test_assertTrue('count anomalies ACCUMULI_INRETI, expected ' || v_expected || ' but found ' || v_count, v_count = v_expected );

END;
$$ LANGUAGE plpgsql SECURITY DEFINER SET search_path = public,pgunit;
-- ------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 5f8a3a3

Please sign in to comment.