@@ -237,7 +237,7 @@ func TestAsset_List(t *testing.T) {
|
||||
profileID := factory.CreateUser(owner)
|
||||
|
||||
// Create multiple assets
|
||||
for i := 0; i < 3; i++ {
|
||||
for i := range 3 {
|
||||
const query = `
|
||||
mutation($input: CreateAssetInput!) {
|
||||
createAsset(input: $input) {
|
||||
|
||||
@@ -16,6 +16,7 @@ package console_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -114,9 +115,7 @@ func TestAudit_Create(t *testing.T) {
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
"frameworkId": frameworkID,
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
CreateAudit struct {
|
||||
@@ -254,9 +253,7 @@ func TestAudit_Create_Validation(t *testing.T) {
|
||||
if !tt.skipFramework {
|
||||
input["frameworkId"] = frameworkID
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -1132,7 +1129,7 @@ func TestAudit_Pagination(t *testing.T) {
|
||||
|
||||
frameworkID := factory.NewFramework(owner).WithName("Framework for Pagination").Create()
|
||||
|
||||
for i := 0; i < 5; i++ {
|
||||
for i := range 5 {
|
||||
factory.NewAudit(owner, frameworkID).
|
||||
WithName(fmt.Sprintf("Pagination Audit %d", i)).
|
||||
Create()
|
||||
|
||||
@@ -242,7 +242,7 @@ func TestContinualImprovement_List(t *testing.T) {
|
||||
}
|
||||
`
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
for i := range 3 {
|
||||
_, err := owner.Do(createQuery, map[string]any{
|
||||
"input": map[string]any{
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
|
||||
@@ -16,6 +16,7 @@ package console_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -104,9 +105,7 @@ func TestDatum_Create(t *testing.T) {
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
"ownerId": profileID,
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
CreateDatum struct {
|
||||
@@ -253,9 +252,7 @@ func TestDatum_Create_Validation(t *testing.T) {
|
||||
if !tt.skipOwner {
|
||||
input["ownerId"] = profileID
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -1103,7 +1100,7 @@ func TestDatum_Pagination(t *testing.T) {
|
||||
owner := testutil.NewClient(t, testutil.RoleOwner)
|
||||
profileID := factory.CreateUser(owner)
|
||||
|
||||
for i := 0; i < 5; i++ {
|
||||
for i := range 5 {
|
||||
factory.NewDatum(owner, profileID).
|
||||
WithName(fmt.Sprintf("Pagination Datum %d", i)).
|
||||
Create()
|
||||
|
||||
@@ -16,6 +16,7 @@ package console_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -115,9 +116,7 @@ func TestDocument_Create(t *testing.T) {
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
"approverIds": []string{approverProfileID},
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
CreateDocument struct {
|
||||
@@ -285,9 +284,7 @@ func TestDocument_Create_Validation(t *testing.T) {
|
||||
if !tt.skipApprover {
|
||||
input["approverIds"] = []string{approverProfileID}
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -1120,7 +1117,7 @@ func TestDocument_Pagination(t *testing.T) {
|
||||
owner := testutil.NewClient(t, testutil.RoleOwner)
|
||||
approverProfileID := factory.CreateUser(owner)
|
||||
|
||||
for i := 0; i < 5; i++ {
|
||||
for i := range 5 {
|
||||
factory.NewDocument(owner, approverProfileID).
|
||||
WithTitle(fmt.Sprintf("Pagination Document %d", i)).
|
||||
Create()
|
||||
|
||||
@@ -16,6 +16,7 @@ package console_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -74,9 +75,7 @@ func TestFramework_Create(t *testing.T) {
|
||||
input := map[string]any{
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
CreateFramework struct {
|
||||
@@ -216,9 +215,7 @@ func TestFramework_Create_Validation(t *testing.T) {
|
||||
if !tt.skipOrganization {
|
||||
input["organizationId"] = owner.GetOrganizationID().String()
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -753,9 +750,7 @@ func TestFramework_OmittableDescription(t *testing.T) {
|
||||
`
|
||||
|
||||
input := map[string]any{"id": frameworkID}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
UpdateFramework struct {
|
||||
@@ -1121,9 +1116,7 @@ func TestFramework_MaxLength_Validation(t *testing.T) {
|
||||
input := map[string]any{
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -1163,9 +1156,7 @@ func TestFramework_MaxLength_Validation(t *testing.T) {
|
||||
`
|
||||
|
||||
input := map[string]any{"id": frameworkID}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -1236,7 +1227,7 @@ func TestFramework_Pagination(t *testing.T) {
|
||||
owner := testutil.NewClient(t, testutil.RoleOwner)
|
||||
|
||||
// Create exactly 5 frameworks for pagination testing
|
||||
for i := 0; i < 5; i++ {
|
||||
for i := range 5 {
|
||||
factory.NewFramework(owner).
|
||||
WithName(fmt.Sprintf("Pagination Framework %d", i)).
|
||||
Create()
|
||||
|
||||
@@ -16,6 +16,7 @@ package console_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -113,9 +114,7 @@ func TestMeasure_Create(t *testing.T) {
|
||||
input := map[string]any{
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
CreateMeasure struct {
|
||||
@@ -301,9 +300,7 @@ func TestMeasure_Create_Validation(t *testing.T) {
|
||||
if !tt.skipOrganization {
|
||||
input["organizationId"] = owner.GetOrganizationID().String()
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -875,9 +872,7 @@ func TestMeasure_OmittableDescription(t *testing.T) {
|
||||
`
|
||||
|
||||
input := map[string]any{"id": measureID}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
UpdateMeasure struct {
|
||||
@@ -1246,9 +1241,7 @@ func TestMeasure_MaxLength_Validation(t *testing.T) {
|
||||
input := map[string]any{
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -1293,9 +1286,7 @@ func TestMeasure_MaxLength_Validation(t *testing.T) {
|
||||
`
|
||||
|
||||
input := map[string]any{"id": measureID}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -1496,7 +1487,7 @@ func TestMeasure_Pagination(t *testing.T) {
|
||||
|
||||
// Create multiple measures for pagination testing
|
||||
measureIDs := make([]string, 5)
|
||||
for i := 0; i < 5; i++ {
|
||||
for i := range 5 {
|
||||
measureIDs[i] = factory.NewMeasure(owner).
|
||||
WithName(fmt.Sprintf("Pagination Measure %d", i)).
|
||||
Create()
|
||||
|
||||
@@ -16,6 +16,7 @@ package console_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -77,9 +78,7 @@ func TestMeeting_Create(t *testing.T) {
|
||||
input := map[string]any{
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
CreateMeeting struct {
|
||||
@@ -211,9 +210,7 @@ func TestMeeting_Create_Validation(t *testing.T) {
|
||||
if !tt.skipOrganization {
|
||||
input["organizationId"] = owner.GetOrganizationID().String()
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -1023,7 +1020,7 @@ func TestMeeting_Pagination(t *testing.T) {
|
||||
t.Parallel()
|
||||
owner := testutil.NewClient(t, testutil.RoleOwner)
|
||||
|
||||
for i := 0; i < 5; i++ {
|
||||
for i := range 5 {
|
||||
factory.NewMeeting(owner).
|
||||
WithName(fmt.Sprintf("Pagination Meeting %d", i)).
|
||||
Create()
|
||||
|
||||
@@ -323,7 +323,7 @@ func TestNonconformity_List(t *testing.T) {
|
||||
}
|
||||
`
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
for i := range 3 {
|
||||
var createResult struct {
|
||||
CreateNonconformity struct {
|
||||
NonconformityEdge struct {
|
||||
|
||||
@@ -16,6 +16,7 @@ package console_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"maps"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -114,9 +115,7 @@ func TestProcessingActivity_Create(t *testing.T) {
|
||||
input := map[string]any{
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
var result struct {
|
||||
CreateProcessingActivity struct {
|
||||
@@ -193,9 +192,7 @@ func TestProcessingActivity_Create_Validation(t *testing.T) {
|
||||
if !tt.skipOrganization {
|
||||
input["organizationId"] = owner.GetOrganizationID().String()
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
@@ -898,7 +895,7 @@ func TestProcessingActivity_Pagination(t *testing.T) {
|
||||
t.Parallel()
|
||||
owner := testutil.NewClient(t, testutil.RoleOwner)
|
||||
|
||||
for i := 0; i < 5; i++ {
|
||||
for i := range 5 {
|
||||
factory.NewProcessingActivity(owner).
|
||||
WithName(fmt.Sprintf("Pagination PA %d", i)).
|
||||
Create()
|
||||
|
||||
@@ -249,7 +249,7 @@ func TestRightsRequest_List(t *testing.T) {
|
||||
}
|
||||
`
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
for i := range 3 {
|
||||
_, err := owner.Do(createQuery, map[string]any{
|
||||
"input": map[string]any{
|
||||
"organizationId": owner.GetOrganizationID().String(),
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
package console_test
|
||||
|
||||
import (
|
||||
"maps"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -401,9 +402,7 @@ func TestRisk_RequiredFields(t *testing.T) {
|
||||
if !tt.skipOrganization {
|
||||
input["organizationId"] = owner.GetOrganizationID().String()
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
|
||||
@@ -230,7 +230,7 @@ func TestVendorContact_List(t *testing.T) {
|
||||
vendorID := factory.NewVendor(owner).WithName("List Contacts Vendor").Create()
|
||||
|
||||
// Create multiple contacts
|
||||
for i := 0; i < 3; i++ {
|
||||
for i := range 3 {
|
||||
query := `
|
||||
mutation CreateVendorContact($input: CreateVendorContactInput!) {
|
||||
createVendorContact(input: $input) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
package console_test
|
||||
|
||||
import (
|
||||
"maps"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -340,9 +341,7 @@ func TestVendor_RequiredFields(t *testing.T) {
|
||||
if !tt.skipOrganization {
|
||||
input["organizationId"] = owner.GetOrganizationID().String()
|
||||
}
|
||||
for k, v := range tt.input {
|
||||
input[k] = v
|
||||
}
|
||||
maps.Copy(input, tt.input)
|
||||
|
||||
_, err := owner.Do(query, map[string]any{"input": input})
|
||||
require.Error(t, err)
|
||||
|
||||
Reference in New Issue
Block a user