Skip to content

Commit

Permalink
Merge pull request #913 from joshrwolf/test-jsonschema
Browse files Browse the repository at this point in the history
fix test.environment jsonschema struct tag
  • Loading branch information
joshrwolf authored Mar 7, 2024
2 parents 7860a48 + 8617729 commit 1b8b1de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ type Test struct {
// Environment.Contents.Packages automatically get
// package.dependencies.runtime added to it. So, if your test needs
// no additional packages, you can leave it blank.
Environment apko_types.ImageConfiguration
Environment apko_types.ImageConfiguration `json:"environment" yaml:"environment"`

// Required: The list of pipelines that test the produced package.
Pipeline []Pipeline `json:"pipeline" yaml:"pipeline"`
Expand Down Expand Up @@ -861,7 +861,7 @@ func ParseConfiguration(ctx context.Context, configurationFilePath string, opts
defaultEnvVarGOMODCACHE = "/var/cache/melange/gomodcache"
)

var setIfEmpty = func(key, value string) {
setIfEmpty := func(key, value string) {
if cfg.Environment.Environment[key] == "" {
cfg.Environment.Environment[key] = value
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@
},
"Test": {
"properties": {
"Environment": {
"environment": {
"$ref": "#/$defs/ImageConfiguration",
"description": "Additional Environment necessary for test.\nEnvironment.Contents.Packages automatically get\npackage.dependencies.runtime added to it. So, if your test needs\nno additional packages, you can leave it blank."
},
Expand All @@ -836,7 +836,7 @@
"additionalProperties": false,
"type": "object",
"required": [
"Environment",
"environment",
"pipeline"
]
},
Expand Down

0 comments on commit 1b8b1de

Please sign in to comment.