Skip to content

Commit

Permalink
Merge pull request #354 from ulucinar/json-license
Browse files Browse the repository at this point in the history
Add .license files for the JSON test artifacts
  • Loading branch information
ulucinar authored Feb 23, 2024
2 parents eaa1e9a + 22a7a64 commit 2eb7f71
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions pkg/resource/json/canonical_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func TestCanonicalize(t *testing.T) {
if err != nil {
t.Fatalf("Failed to read expected the output file: %v", err)
}
expectedOutput = strings.Join(strings.Split(strings.TrimSpace(string(output)), "\n")[3:], "\n")
expectedOutput = strings.TrimSpace(string(output))
}

inputJSON := strings.Join(strings.Split(strings.TrimSpace(string(input)), "\n")[3:], "\n")
inputJSON := strings.TrimSpace(string(input))
canonicalJSON, err := Canonicalize(inputJSON)
if err != nil {
if diff := cmp.Diff(tc.err, err, test.EquateErrors()); diff != "" {
Expand Down
3 changes: 0 additions & 3 deletions pkg/resource/json/testdata/array.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
[
{
"Principal": [
Expand Down
3 changes: 3 additions & 0 deletions pkg/resource/json/testdata/array.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>

SPDX-License-Identifier: Apache-2.0
3 changes: 0 additions & 3 deletions pkg/resource/json/testdata/array_canonical.json
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
[{"Principal":["arn:aws:iam::153891904029:user/official-provider-testing"],"Rules":[{"Permission":["aoss:*"],"Resource":["index/example-collection/*"],"ResourceType":"index"},{"Permission":["aoss:*"],"Resource":["collection/example-collection"],"ResourceType":"collection"}]}]
3 changes: 3 additions & 0 deletions pkg/resource/json/testdata/array_canonical.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>

SPDX-License-Identifier: Apache-2.0
3 changes: 0 additions & 3 deletions pkg/resource/json/testdata/invalid.json
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
{"a": "b",}
3 changes: 3 additions & 0 deletions pkg/resource/json/testdata/invalid.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>

SPDX-License-Identifier: Apache-2.0
3 changes: 0 additions & 3 deletions pkg/resource/json/testdata/policy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
{
"Rules": [
{
Expand Down
3 changes: 3 additions & 0 deletions pkg/resource/json/testdata/policy.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>

SPDX-License-Identifier: Apache-2.0
3 changes: 0 additions & 3 deletions pkg/resource/json/testdata/policy_canonical.json
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
{"AWSOwnedKey":true,"Rules":[{"Resource":["collection/example-collection-2"],"ResourceType":"collection"}]}
3 changes: 3 additions & 0 deletions pkg/resource/json/testdata/policy_canonical.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>

SPDX-License-Identifier: Apache-2.0

0 comments on commit 2eb7f71

Please sign in to comment.