Skip to content
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
3 changes: 3 additions & 0 deletions bundle/config/root.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -78,6 +78,9 @@ func (r *Root) SetConfigFilePath(path string) {
r.Resources.SetConfigFilePath(path)
if r.Environments != nil {
for _, env := range r.Environments {
if env == nil {
continue
}
if env.Resources != nil {
env.Resources.SetConfigFilePath(path)
}
Expand Down
5 changes: 5 additions & 0 deletions bundle/tests/environment_empty/bundle.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
bundle:
name: environment_empty

environments:
development:
12 changes: 12 additions & 0 deletions bundle/tests/environment_empty_test.go
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
package config_tests

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestEnvironmentEmpty(t *testing.T) {
b := loadEnvironment(t, "./environment_empty", "development")
assert.Equal(t, "development", b.Config.Bundle.Environment)
}