Skip to content

Commit

Permalink
Changing name at the env variable
Browse files Browse the repository at this point in the history
Signed-off-by: Domenico Luciani <[email protected]>
  • Loading branch information
Domenico Luciani committed Aug 18, 2023
1 parent f7a9f4c commit f2fe896
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions platform/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const (
// via a credential helper, or via the `CNB_REGISTRY_AUTH` environment variable. See [auth.DefaultKeychain] for further information.
const EnvUseDaemon = "CNB_USE_DAEMON"

// EnvInsecureRegistry configures the lifecycle to export the application to a remote "insecure" registry
const EnvInsecureRegistry = "CNB_INSECURE_REGISTRIES"
// EnvInsecureRegistries configures the lifecycle to export the application to a remote "insecure" registry
const EnvInsecureRegistries = "CNB_INSECURE_REGISTRIES"

// ## Provided to handle inputs and outputs in OCI layout format

Expand Down
2 changes: 1 addition & 1 deletion platform/lifecycle_inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func NewLifecycleInputs(platformAPI *api.Version) *LifecycleInputs {
PlatformAPI: platformAPI,
ExtendKind: envOrDefault(EnvExtendKind, DefaultExtendKind),
UseDaemon: boolEnv(EnvUseDaemon),
InsecureRegistries: sliceEnv(EnvInsecureRegistry),
InsecureRegistries: sliceEnv(EnvInsecureRegistries),
UseLayout: boolEnv(EnvUseLayout),

// Provided by the base image
Expand Down
4 changes: 2 additions & 2 deletions platform/lifecycle_inputs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func testLifecycleInputs(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, os.Setenv(platform.EnvUID, "1234"))
h.AssertNil(t, os.Setenv(platform.EnvUseDaemon, "true"))
h.AssertNil(t, os.Setenv(platform.EnvUseLayout, "true"))
h.AssertNil(t, os.Setenv(platform.EnvInsecureRegistry, "some-insecure-registry,another-insecure-registry, just-another-registry"))
h.AssertNil(t, os.Setenv(platform.EnvInsecureRegistries, "some-insecure-registry,another-insecure-registry, just-another-registry"))
})

it.After(func() {
Expand Down Expand Up @@ -132,7 +132,7 @@ func testLifecycleInputs(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, os.Unsetenv(platform.EnvUID))
h.AssertNil(t, os.Unsetenv(platform.EnvUseDaemon))
h.AssertNil(t, os.Unsetenv(platform.EnvUseLayout))
h.AssertNil(t, os.Unsetenv(platform.EnvInsecureRegistry))
h.AssertNil(t, os.Unsetenv(platform.EnvInsecureRegistries))
})

it("returns lifecycle inputs with env values fill in", func() {
Expand Down

0 comments on commit f2fe896

Please sign in to comment.