|
|
|
|
@@ -1278,12 +1278,12 @@ func getConfigWithAnnotations(resourceType string, name string, shaData string,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return util.Config{
|
|
|
|
|
Namespace: ns,
|
|
|
|
|
ResourceName: name,
|
|
|
|
|
SHAValue: shaData,
|
|
|
|
|
Annotation: annotation,
|
|
|
|
|
TypedAutoAnnotation: typedAutoAnnotation,
|
|
|
|
|
Type: resourceType,
|
|
|
|
|
Namespace: ns,
|
|
|
|
|
ResourceName: name,
|
|
|
|
|
SHAValue: shaData,
|
|
|
|
|
Annotation: annotation,
|
|
|
|
|
TypedAutoAnnotation: typedAutoAnnotation,
|
|
|
|
|
Type: resourceType,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1317,6 +1317,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapWithoutReloadAnnotationAndWithoutAutoReloadAllNoTriggersUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1340,7 +1344,11 @@ func TestRollingUpgradeForDeploymentWithConfigmapWithoutReloadAnnotationAndWitho
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) > 0 {
|
|
|
|
|
t.Errorf("Counter was increased")
|
|
|
|
|
t.Errorf("Counter was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
|
|
|
|
|
t.Errorf("Counter by namespace was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1369,6 +1377,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapWithoutReloadAnnotationButWithA
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapInProjectedVolumeUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1393,6 +1405,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapInProjectedVolumeUsingArs(t *te
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1418,6 +1434,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationUsingArs(t *
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNoTriggersUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1444,6 +1464,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNoTriggersUs
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) > 0 {
|
|
|
|
|
t.Errorf("Counter was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
|
|
|
|
|
t.Errorf("Counter by namespace was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNotMappedUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1483,6 +1507,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNotMappedUsi
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) > 0 {
|
|
|
|
|
t.Errorf("Counter was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 {
|
|
|
|
|
t.Errorf("Counter by namespace was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapInInitContainerUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1508,6 +1536,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapInInitContainerUsingArs(t *test
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapInProjectVolumeInInitContainerUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1533,6 +1565,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapInProjectVolumeInInitContainerU
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1558,6 +1594,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarUsingArs(t *testing.T)
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarInInitContainerUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1583,6 +1623,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarInInitContainerUsingArs
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarFromUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1608,6 +1652,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarFromUsingArs(t *testing
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1633,6 +1681,10 @@ func TestRollingUpgradeForDeploymentWithSecretUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1658,6 +1710,10 @@ func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeUsingArs(t *testi
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretinInitContainerUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1683,6 +1739,10 @@ func TestRollingUpgradeForDeploymentWithSecretinInitContainerUsingArs(t *testing
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeinInitContainerUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1708,6 +1768,10 @@ func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeinInitContainerUs
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretAsEnvVarUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1733,6 +1797,10 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretAsEnvVarFromUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1758,6 +1826,10 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarFromUsingArs(t *testing.T)
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretAsEnvVarInInitContainerUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1783,6 +1855,10 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarInInitContainerUsingArs(t
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretAutoAnnotationUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1808,6 +1884,10 @@ func TestRollingUpgradeForDeploymentWithSecretAutoAnnotationUsingArs(t *testing.
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigMapAutoAnnotationUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1833,6 +1913,10 @@ func TestRollingUpgradeForDeploymentWithConfigMapAutoAnnotationUsingArs(t *testi
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithConfigmapUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1858,6 +1942,10 @@ func TestRollingUpgradeForDaemonSetWithConfigmapUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithConfigmapInProjectedVolumeUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1883,6 +1971,10 @@ func TestRollingUpgradeForDaemonSetWithConfigmapInProjectedVolumeUsingArs(t *tes
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithConfigmapAsEnvVarUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1908,6 +2000,10 @@ func TestRollingUpgradeForDaemonSetWithConfigmapAsEnvVarUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithSecretUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1933,6 +2029,10 @@ func TestRollingUpgradeForDaemonSetWithSecretUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithSecretInProjectedVolumeUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1958,6 +2058,10 @@ func TestRollingUpgradeForDaemonSetWithSecretInProjectedVolumeUsingArs(t *testin
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForStatefulSetWithConfigmapUsingArs(t *testing.T) {
|
|
|
|
|
@@ -1983,6 +2087,10 @@ func TestRollingUpgradeForStatefulSetWithConfigmapUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForStatefulSetWithConfigmapInProjectedVolumeUsingArs(t *testing.T) {
|
|
|
|
|
@@ -2008,6 +2116,10 @@ func TestRollingUpgradeForStatefulSetWithConfigmapInProjectedVolumeUsingArs(t *t
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForStatefulSetWithSecretUsingArs(t *testing.T) {
|
|
|
|
|
@@ -2033,6 +2145,10 @@ func TestRollingUpgradeForStatefulSetWithSecretUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForStatefulSetWithSecretInProjectedVolumeUsingArs(t *testing.T) {
|
|
|
|
|
@@ -2058,6 +2174,10 @@ func TestRollingUpgradeForStatefulSetWithSecretInProjectedVolumeUsingArs(t *test
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithPodAnnotationsUsingArs(t *testing.T) {
|
|
|
|
|
@@ -2110,6 +2230,10 @@ func TestRollingUpgradeForDeploymentWithPodAnnotationsUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestFailedRollingUpgradeUsingArs(t *testing.T) {
|
|
|
|
|
@@ -2128,6 +2252,10 @@ func TestFailedRollingUpgradeUsingArs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelFailed)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "false", "namespace": arsNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2153,6 +2281,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapInProjectedVolumeUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2177,6 +2309,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapInProjectedVolumeUsingErs(t *te
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2202,6 +2338,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationUsingErs(t *
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNoTriggersUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2228,6 +2368,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNoTriggersUs
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) > 0 {
|
|
|
|
|
t.Errorf("Counter was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) > 0 {
|
|
|
|
|
t.Errorf("Counter by namespace was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNotMappedUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2267,6 +2411,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNotMappedUsi
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) > 0 {
|
|
|
|
|
t.Errorf("Counter was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) > 0 {
|
|
|
|
|
t.Errorf("Counter by namespace was increased unexpectedly")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapInInitContainerUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2292,6 +2440,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapInInitContainerUsingErs(t *test
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapInProjectVolumeInInitContainerUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2317,6 +2469,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapInProjectVolumeInInitContainerU
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2342,6 +2498,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarUsingErs(t *testing.T)
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarInInitContainerUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2367,6 +2527,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarInInitContainerUsingErs
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarFromUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2392,6 +2556,10 @@ func TestRollingUpgradeForDeploymentWithConfigmapAsEnvVarFromUsingErs(t *testing
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2417,6 +2585,10 @@ func TestRollingUpgradeForDeploymentWithSecretUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2442,6 +2614,10 @@ func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeUsingErs(t *testi
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretinInitContainerUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2467,6 +2643,10 @@ func TestRollingUpgradeForDeploymentWithSecretinInitContainerUsingErs(t *testing
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeinInitContainerUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2492,6 +2672,10 @@ func TestRollingUpgradeForDeploymentWithSecretInProjectedVolumeinInitContainerUs
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretAsEnvVarUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2517,6 +2701,10 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretAsEnvVarFromUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2542,6 +2730,10 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarFromUsingErs(t *testing.T)
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretAsEnvVarInInitContainerUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2567,6 +2759,10 @@ func TestRollingUpgradeForDeploymentWithSecretAsEnvVarInInitContainerUsingErs(t
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithSecretAutoAnnotationUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2592,6 +2788,10 @@ func TestRollingUpgradeForDeploymentWithSecretAutoAnnotationUsingErs(t *testing.
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithConfigMapAutoAnnotationUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2617,6 +2817,10 @@ func TestRollingUpgradeForDeploymentWithConfigMapAutoAnnotationUsingErs(t *testi
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithConfigmapUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2642,6 +2846,10 @@ func TestRollingUpgradeForDaemonSetWithConfigmapUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithConfigmapInProjectedVolumeUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2667,6 +2875,10 @@ func TestRollingUpgradeForDaemonSetWithConfigmapInProjectedVolumeUsingErs(t *tes
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithConfigmapAsEnvVarUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2692,6 +2904,10 @@ func TestRollingUpgradeForDaemonSetWithConfigmapAsEnvVarUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithSecretUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2717,6 +2933,10 @@ func TestRollingUpgradeForDaemonSetWithSecretUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDaemonSetWithSecretInProjectedVolumeUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2742,6 +2962,10 @@ func TestRollingUpgradeForDaemonSetWithSecretInProjectedVolumeUsingErs(t *testin
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForStatefulSetWithConfigmapUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2767,6 +2991,10 @@ func TestRollingUpgradeForStatefulSetWithConfigmapUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForStatefulSetWithConfigmapInProjectedVolumeUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2792,6 +3020,10 @@ func TestRollingUpgradeForStatefulSetWithConfigmapInProjectedVolumeUsingErs(t *t
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForStatefulSetWithSecretUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2817,6 +3049,10 @@ func TestRollingUpgradeForStatefulSetWithSecretUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForStatefulSetWithSecretInProjectedVolumeUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2842,6 +3078,10 @@ func TestRollingUpgradeForStatefulSetWithSecretInProjectedVolumeUsingErs(t *test
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestRollingUpgradeForDeploymentWithPodAnnotationsUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2895,6 +3135,10 @@ func TestRollingUpgradeForDeploymentWithPodAnnotationsUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelSucceeded)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "true", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestFailedRollingUpgradeUsingErs(t *testing.T) {
|
|
|
|
|
@@ -2913,4 +3157,8 @@ func TestFailedRollingUpgradeUsingErs(t *testing.T) {
|
|
|
|
|
if promtestutil.ToFloat64(collectors.Reloaded.With(labelFailed)) != 1 {
|
|
|
|
|
t.Errorf("Counter was not increased")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if promtestutil.ToFloat64(collectors.ReloadedByNamespace.With(prometheus.Labels{"success": "false", "namespace": ersNamespace})) != 1 {
|
|
|
|
|
t.Errorf("Counter by namespace was not increased")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|