Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix test.environment jsonschema struct tag #913

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading