From 8617729617de65516814bc66ba9b8b0518dd3045 Mon Sep 17 00:00:00 2001 From: Josh Wolf Date: Thu, 4 Jan 2024 15:24:53 -0500 Subject: [PATCH] fix test.environment jsonschema struct tag Signed-off-by: Josh Wolf --- pkg/config/config.go | 4 ++-- pkg/config/schema.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 9baa3565e..ae906a6d4 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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"` @@ -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 } diff --git a/pkg/config/schema.json b/pkg/config/schema.json index 23f213f9e..336940e81 100644 --- a/pkg/config/schema.json +++ b/pkg/config/schema.json @@ -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." }, @@ -846,7 +846,7 @@ "additionalProperties": false, "type": "object", "required": [ - "Environment", + "environment", "pipeline" ] },