Make default release fixture contain custom labels to make tests check that labels are not lost

Signed-off-by: Dmitry Chepurovskiy <dm3ch@dm3ch.net>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
This commit is contained in:
Dmitry Chepurovskiy
2022-01-12 03:36:12 +03:00
committed by Dmitry Chepurovskiy
parent 68721de93d
commit 2f29ccb9d0
2 changed files with 4 additions and 5 deletions

View File

@@ -40,6 +40,10 @@ func releaseStub(name string, vers int, namespace string, status rspb.Status) *r
Version: vers,
Namespace: namespace,
Info: &rspb.Info{Status: status},
Labels: map[string]string{
"k1": "v1",
"k2": "v2",
},
}
}

View File

@@ -104,10 +104,5 @@ func filterSystemLabels(lbs map[string]string) map[string]string {
result[k] = v
}
}
// Workaround to make tests work while labels storage is not implemented for SQL storage driver
if len(result) == 0 {
return nil
}
return result
}