Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
S
stats-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneurs
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
stats-facil
Validations
a6a9ce2d
Valider
a6a9ce2d
rédigé
11 years ago
par
mattab
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Revert test to previous state from 10 days ago, now that we've reverted the API refs #4878
parent
644b63fd
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
tests/PHPUnit/Integration/PrivacyManagerTest.php
+3
-12
3 ajouts, 12 suppressions
tests/PHPUnit/Integration/PrivacyManagerTest.php
avec
3 ajouts
et
12 suppressions
tests/PHPUnit/Integration/PrivacyManagerTest.php
+
3
−
12
Voir le fichier @
a6a9ce2d
...
@@ -33,10 +33,6 @@ class PrivacyManagerTest extends IntegrationTestCase
...
@@ -33,10 +33,6 @@ class PrivacyManagerTest extends IntegrationTestCase
// total archive count for each month.
// total archive count for each month.
const
TOTAL_JAN_ARCHIVE_COUNT
=
37
;
// 31 + 4 + 1 + 1;
const
TOTAL_JAN_ARCHIVE_COUNT
=
37
;
// 31 + 4 + 1 + 1;
const
TOTAL_FEB_ARCHIVE_COUNT
=
34
;
// 29 + 4 + 1;
const
TOTAL_FEB_ARCHIVE_COUNT
=
34
;
// 29 + 4 + 1;
const
JAN_DAYS_WITH_VISITS
=
5
;
const
JAN_METRIC_RETURNING_VISIT_DAYS
=
4
;
const
FEB_DAYS_WITH_VISITS
=
6
;
const
FEB_METRIC_RETURNING_VISIT_DAYS
=
6
;
// the number of archive entries for a single metric if no purging is done. this #
// the number of archive entries for a single metric if no purging is done. this #
// is dependent on the number of periods for which there were visits.
// is dependent on the number of periods for which there were visits.
...
@@ -223,7 +219,7 @@ class PrivacyManagerTest extends IntegrationTestCase
...
@@ -223,7 +219,7 @@ class PrivacyManagerTest extends IntegrationTestCase
// January numeric table should be dropped
// January numeric table should be dropped
$this
->
assertFalse
(
$this
->
_tableExists
(
$archiveTables
[
'numeric'
][
0
]));
// January
$this
->
assertFalse
(
$this
->
_tableExists
(
$archiveTables
[
'numeric'
][
0
]));
// January
// Check february metric count
// Check february metric count
$febRowCount
=
$this
->
_getExpectedNumericArchiveCountFeb
();
$febRowCount
=
$this
->
_getExpectedNumericArchiveCountFeb
();
$this
->
assertEquals
(
$febRowCount
,
$this
->
_getTableCount
(
$archiveTables
[
'numeric'
][
1
]));
// February
$this
->
assertEquals
(
$febRowCount
,
$this
->
_getTableCount
(
$archiveTables
[
'numeric'
][
1
]));
// February
...
@@ -893,9 +889,7 @@ class PrivacyManagerTest extends IntegrationTestCase
...
@@ -893,9 +889,7 @@ class PrivacyManagerTest extends IntegrationTestCase
// + 1 garbage metric
// + 1 garbage metric
// log_link_visit_action+ 2 entries per range period (4 total) + 2 'done...' entries per range period (4 total)
// log_link_visit_action+ 2 entries per range period (4 total) + 2 'done...' entries per range period (4 total)
// + 2 entries per segment (2 total) + 2 'done...' entries per segment (2 total)
// + 2 entries per segment (2 total) + 2 'done...' entries per segment (2 total)
// + 2 entries per day w/ returning visits + 1 entry per day w/ visits (visit frequency's visit summary metrics & segment done entries)
return
self
::
JAN_METRIC_ARCHIVE_COUNT
*
5
+
self
::
TOTAL_JAN_ARCHIVE_COUNT
+
1
+
8
+
4
;
return
self
::
JAN_METRIC_ARCHIVE_COUNT
*
5
+
self
::
TOTAL_JAN_ARCHIVE_COUNT
+
1
+
8
+
4
+
2
*
self
::
JAN_METRIC_RETURNING_VISIT_DAYS
+
self
::
JAN_DAYS_WITH_VISITS
;
}
}
protected
function
_getExpectedNumericArchiveCountFeb
()
protected
function
_getExpectedNumericArchiveCountFeb
()
...
@@ -903,10 +897,7 @@ class PrivacyManagerTest extends IntegrationTestCase
...
@@ -903,10 +897,7 @@ class PrivacyManagerTest extends IntegrationTestCase
// (5 metrics per period w/ visits
// (5 metrics per period w/ visits
// + 1 'done' archive for every period)
// + 1 'done' archive for every period)
// + 1 garbage metric
// + 1 garbage metric
// + 1 entry per period w/ returning visits
return
self
::
FEB_METRIC_ARCHIVE_COUNT
*
5
+
self
::
TOTAL_FEB_ARCHIVE_COUNT
+
1
;
// + 2 entries per day w/ returning visits + 1 entry per day w/ visits (visit frequency's visit summary metrics & segment done entries)
return
self
::
FEB_METRIC_ARCHIVE_COUNT
*
5
+
self
::
TOTAL_FEB_ARCHIVE_COUNT
+
1
+
2
*
self
::
FEB_METRIC_RETURNING_VISIT_DAYS
+
self
::
FEB_DAYS_WITH_VISITS
;
}
}
/**
/**
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter