Skip to content

Commit

Permalink
Updating test data to bring in line with Lagoon standards
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko committed Dec 4, 2023
1 parent d9c1b41 commit c6c313c
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion internal/handler/insightsFactsParserFilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func Test_processFactsInsightsData(t *testing.T) {
v: string(data),
apiClient: apiClient,
resource: ResourceDestination{
Project: "high-cotton",
Project: "organization-cotton",
Service: "cli",
},
},
Expand Down
14 changes: 6 additions & 8 deletions internal/handler/testassets/directFactsPayload.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"projectName": "high-cotton",
"projectName": "organization-cotton",
"environment": 3,
"environmentName": "Master",
"environmentName": "main",
"facts": [
{
"projectName": "high-cotton",
"environment": 3,
"environmentName": "Master",
"projectName": "organization-cotton",
"environmentName": "main",
"name": "drupal-core",
"value": "9.0.1",
"description": "Drupal CMS version found on environment",
Expand All @@ -16,9 +15,8 @@
"keyFact": true
},
{
"projectName": "high-cotton",
"environment": 3,
"environmentName": "Master",
"projectName": "organization-cotton",
"environmentName": "main",
"name": "php-version",
"value": "8.0.3",
"description": "PHP version found on environment",
Expand Down
6 changes: 3 additions & 3 deletions internal/handler/testassets/directProblemsPayload.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"projectName": "test6-drupal-example-simple",
"environment": 1236,
"environmentName": "test1copy",
"projectName": "organization-cotton",
"environment": 3,
"environmentName": "main",
"problems": [
{
"environment": 3,
Expand Down
8 changes: 4 additions & 4 deletions internal/handler/testassets/directProblemsPayload2.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"environment": 1236,
"projectName": "test6-drupal-example-simple",
"environmentName": "test1copy",
"environment": 3,
"projectName": "organization-cotton",
"environmentName": "main",
"problems": [
{
"environment": 1236,
"environment": 3,
"identifier": "1234",
"version": "1.0.1",
"fixedVersion": "1.0.2",
Expand Down
8 changes: 4 additions & 4 deletions internal/handler/testassets/rawFactsInsightsPayload.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"payload": [
{
"project": "high-cotton",
"environment": "Master",
"project": "organization-cotton",
"environment": "main",
"facts": [
{
"name": "drupal-core",
Expand Down Expand Up @@ -30,8 +30,8 @@
"binaryPayload": {},
"annotations": {},
"labels": {
"lagoon.sh/project": "high-cotton",
"lagoon.sh/environment": "Master",
"lagoon.sh/project": "organization-cotton",
"lagoon.sh/environment": "main",
"lagoon.sh/service": "cli",
"lagoon.sh/insightsType": "raw",
"lagoon.sh/insightsOutputFileMIMEType": "application/json",
Expand Down
4 changes: 2 additions & 2 deletions internal/handler/testassets/testImageInspect.gz.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
},
"annotations": {},
"labels": {
"lagoon.sh/project": "high-cotton",
"lagoon.sh/environment": "Master",
"lagoon.sh/project": "organization-cotton",
"lagoon.sh/environment": "main",
"lagoon.sh/service": "cli",
"lagoon.sh/insightsType": "image-gz",
"lagoon.sh/insightsOutputCompressed": "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
},
"annotations": {},
"labels": {
"lagoon.sh/project": "high-cotton",
"lagoon.sh/environment": "Master",
"lagoon.sh/project": "organization-cotton",
"lagoon.sh/environment": "main",
"lagoon.sh/service": "cli",
"lagoon.sh/insightsType": "image-gz",
"lagoon.sh/insightsOutputCompressed": "true"
Expand Down
4 changes: 2 additions & 2 deletions internal/handler/testassets/testRawJson.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"binaryPayload": {},
"annotations": {},
"labels": {
"lagoon.sh/project": "high-cotton",
"lagoon.sh/environment": "Master",
"lagoon.sh/project": "organization-cotton",
"lagoon.sh/environment": "main",
"lagoon.sh/service": "cli",
"lagoon.sh/insightsType": "raw",
"lagoon.sh/insightsOutputFileMIMEType": "application/json",
Expand Down
4 changes: 2 additions & 2 deletions internal/handler/testassets/testSbomCompressedOutput.gz.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
},
"annotations": {},
"labels": {
"lagoon.sh/project": "high-cotton",
"lagoon.sh/environment": "Master",
"lagoon.sh/project": "organization-cotton",
"lagoon.sh/environment": "main",
"lagoon.sh/service": "cli",
"lagoon.sh/insightsType": "sbom-gz",
"lagoon.sh/insightsOutputCompressed": "true"
Expand Down

0 comments on commit c6c313c

Please sign in to comment.