Skip to content

Commit a049911

Browse files
committed
Update test data schema IDs to reflect their actual path
Since these are only test data, it's not essential that the IDs be correct, but it might lead to confusion.
1 parent b7278c3 commit a049911

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

internal/rule/schema/schema_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func Test_schemaID(t *testing.T) {
212212
require.NotNil(t, err)
213213

214214
id, err := schemaID("valid-schema.json", testdata.Asset)
215-
require.Equal(t, "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/schema-with-references.json", id)
215+
require.Equal(t, "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/input/valid-schema.json", id)
216216
require.Nil(t, err)
217217
}
218218

internal/rule/schema/testdata/bindata.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func invalidSchemaJson() (*asset, error) {
8282

8383
var _referencedSchema1Json = []byte(`{
8484
"$schema": "http://json-schema.org/draft-07/schema#",
85-
"$id": "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/referenced-schema-1.json",
85+
"$id": "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/input/referenced-schema-1.json",
8686
"title": "Schema for use in unit tests",
8787
"definitions": {
8888
"patternObject": {
@@ -112,7 +112,7 @@ func referencedSchema1Json() (*asset, error) {
112112

113113
var _referencedSchema2Json = []byte(`{
114114
"$schema": "http://json-schema.org/draft-07/schema#",
115-
"$id": "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/referenced-schema-2.json",
115+
"$id": "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/input/referenced-schema-2.json",
116116
"title": "Schema for use in unit tests",
117117
"definitions": {
118118
"dependenciesObject": {
@@ -187,7 +187,7 @@ func schemaWithoutIdJson() (*asset, error) {
187187

188188
var _validSchemaWithReferencesJson = []byte(`{
189189
"$schema": "http://json-schema.org/draft-07/schema#",
190-
"$id": "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/schema-with-references.json",
190+
"$id": "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/input/valid-schema-with-references.json",
191191
"title": "Schema for use in unit tests",
192192
"type": "object",
193193
"properties": {
@@ -250,7 +250,7 @@ func validSchemaWithReferencesJson() (*asset, error) {
250250

251251
var _validSchemaJson = []byte(`{
252252
"$schema": "http://json-schema.org/draft-07/schema#",
253-
"$id": "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/schema-with-references.json",
253+
"$id": "https://raw-hub.myxuebi.top/arduino/arduino-lint/main/internal/rule/schema/testdata/input/valid-schema.json",
254254
"title": "Schema for use in unit tests",
255255
"type": "object",
256256
"properties": {

internal/rule/schema/testdata/input/referenced-schema-1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://raw.githubusercontent.com/arduino/arduino-lint/main/internal/rule/schema/testdata/referenced-schema-1.json",
3+
"$id": "https://raw.githubusercontent.com/arduino/arduino-lint/main/internal/rule/schema/testdata/input/referenced-schema-1.json",
44
"title": "Schema for use in unit tests",
55
"definitions": {
66
"patternObject": {

internal/rule/schema/testdata/input/referenced-schema-2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://raw.githubusercontent.com/arduino/arduino-lint/main/internal/rule/schema/testdata/referenced-schema-2.json",
3+
"$id": "https://raw.githubusercontent.com/arduino/arduino-lint/main/internal/rule/schema/testdata/input/referenced-schema-2.json",
44
"title": "Schema for use in unit tests",
55
"definitions": {
66
"dependenciesObject": {

internal/rule/schema/testdata/input/valid-schema-with-references.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://raw.githubusercontent.com/arduino/arduino-lint/main/internal/rule/schema/testdata/schema-with-references.json",
3+
"$id": "https://raw.githubusercontent.com/arduino/arduino-lint/main/internal/rule/schema/testdata/input/valid-schema-with-references.json",
44
"title": "Schema for use in unit tests",
55
"type": "object",
66
"properties": {

internal/rule/schema/testdata/input/valid-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://raw.githubusercontent.com/arduino/arduino-lint/main/internal/rule/schema/testdata/schema-with-references.json",
3+
"$id": "https://raw.githubusercontent.com/arduino/arduino-lint/main/internal/rule/schema/testdata/input/valid-schema.json",
44
"title": "Schema for use in unit tests",
55
"type": "object",
66
"properties": {

0 commit comments

Comments
 (0)