Build: clean up and document integration test convention (#58170)

* clean up and document integration test convention

* clarify integration test conventions

* clean up integration tests that don't follow convention

* mark testIntegration* functions as helpers to avoid confusion
This commit is contained in:
Dan Cech
2022-11-04 10:14:21 -04:00
committed by GitHub
parent 428dd54094
commit 9ea6a43089
36 changed files with 168 additions and 25 deletions
@@ -28,6 +28,9 @@ type setUserResourcePermissionTest struct {
}
func TestIntegrationStore_SetUserResourcePermission(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
tests := []setUserResourcePermissionTest{
{
desc: "should set resource permission for user",
@@ -110,6 +113,9 @@ type setTeamResourcePermissionTest struct {
}
func TestIntegrationStore_SetTeamResourcePermission(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
tests := []setTeamResourcePermissionTest{
{
desc: "should add new resource permission for team",
@@ -195,6 +201,9 @@ type setBuiltInResourcePermissionTest struct {
}
func TestIntegrationStore_SetBuiltInResourcePermission(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
tests := []setBuiltInResourcePermissionTest{
{
desc: "should add new resource permission for builtin role",
@@ -276,6 +285,9 @@ type setResourcePermissionsTest struct {
}
func TestIntegrationStore_SetResourcePermissions(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
tests := []setResourcePermissionsTest{
{
desc: "should set all permissions provided",
@@ -345,6 +357,9 @@ type getResourcePermissionsTest struct {
}
func TestIntegrationStore_GetResourcePermissions(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
tests := []getResourcePermissionsTest{
{
desc: "should return permissions for resource id",