Skip to content

Commit

Permalink
fix test.environment jsonschema struct tag
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Wolf <josh@wolfs.io>
  • Loading branch information
joshrwolf committed Jan 4, 2024
1 parent b73fa7a commit 8617729
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 @@ -385,7 +385,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 @@ -846,7 +846,7 @@ func ParseConfiguration(configurationFilePath string, opts ...ConfigurationParsi
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 @@ -831,7 +831,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 @@ -846,7 +846,7 @@
"additionalProperties": false,
"type": "object",
"required": [
"Environment",
"environment",
"pipeline"
]
},
Expand Down

0 comments on commit 8617729

Please sign in to comment.