diff --git a/.circleci/config.yml b/.circleci/config.yml index 86d373d..87545c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,8 +21,8 @@ jobs: command: | sudo mkdir -p /cfgs/defaults sudo mkdir -p /cfgs/dev - sudo cp test/configuration/defaults/* /cfgs/defaults - sudo cp test/configuration/dev/* /cfgs/dev + sudo cp config_examples/configuration/defaults/* /cfgs/defaults + sudo cp config_examples/configuration/dev/* /cfgs/dev make test mv coverage.html /tmp/artifacts mv c.out /tmp/artifacts diff --git a/test/configuration/defaults/redis.yaml b/config_examples/configuration/defaults/redis.yaml similarity index 100% rename from test/configuration/defaults/redis.yaml rename to config_examples/configuration/defaults/redis.yaml diff --git a/test/configuration/defaults/service.yaml b/config_examples/configuration/defaults/service.yaml similarity index 100% rename from test/configuration/defaults/service.yaml rename to config_examples/configuration/defaults/service.yaml diff --git a/test/configuration/dev/log.yaml b/config_examples/configuration/dev/log.yaml similarity index 100% rename from test/configuration/dev/log.yaml rename to config_examples/configuration/dev/log.yaml diff --git a/test/configuration/dev/redis.yaml b/config_examples/configuration/dev/redis.yaml similarity index 100% rename from test/configuration/dev/redis.yaml rename to config_examples/configuration/dev/redis.yaml diff --git a/test/configuration/dev/service.yaml b/config_examples/configuration/dev/service.yaml similarity index 100% rename from test/configuration/dev/service.yaml rename to config_examples/configuration/dev/service.yaml diff --git a/test/configuration2/defaults/hotelbook.yaml b/config_examples/configuration2/defaults/hotelbook.yaml similarity index 100% rename from test/configuration2/defaults/hotelbook.yaml rename to config_examples/configuration2/defaults/hotelbook.yaml diff --git a/test/configuration2/development/settings.yaml b/config_examples/configuration2/development/settings.yaml similarity index 100% rename from test/configuration2/development/settings.yaml rename to config_examples/configuration2/development/settings.yaml diff --git a/test/configuration2/production/cache_settings.yaml b/config_examples/configuration2/production/cache_settings.yaml similarity index 100% rename from test/configuration2/production/cache_settings.yaml rename to config_examples/configuration2/production/cache_settings.yaml diff --git a/test/configuration2/production/settings.yaml b/config_examples/configuration2/production/settings.yaml similarity index 100% rename from test/configuration2/production/settings.yaml rename to config_examples/configuration2/production/settings.yaml diff --git a/test/merge_error/defaults/redis.yaml b/config_examples/merge_error/defaults/redis.yaml similarity index 100% rename from test/merge_error/defaults/redis.yaml rename to config_examples/merge_error/defaults/redis.yaml diff --git a/test/merge_error/defaults/service.yaml b/config_examples/merge_error/defaults/service.yaml similarity index 100% rename from test/merge_error/defaults/service.yaml rename to config_examples/merge_error/defaults/service.yaml diff --git a/test/merge_error/dev/service.yaml b/config_examples/merge_error/dev/service.yaml similarity index 100% rename from test/merge_error/dev/service.yaml rename to config_examples/merge_error/dev/service.yaml diff --git a/test/no_defaults/development/service.yaml b/config_examples/no_defaults/development/service.yaml similarity index 100% rename from test/no_defaults/development/service.yaml rename to config_examples/no_defaults/development/service.yaml diff --git a/test/no_defaults/development/subdir/extra.yaml b/config_examples/no_defaults/development/subdir/extra.yaml similarity index 100% rename from test/no_defaults/development/subdir/extra.yaml rename to config_examples/no_defaults/development/subdir/extra.yaml diff --git a/test/symnlinkedConfigs/defaults/redis.yaml b/config_examples/symnlinkedConfigs/defaults/redis.yaml similarity index 100% rename from test/symnlinkedConfigs/defaults/redis.yaml rename to config_examples/symnlinkedConfigs/defaults/redis.yaml diff --git a/test/symnlinkedConfigs/defaults/service.yaml b/config_examples/symnlinkedConfigs/defaults/service.yaml similarity index 100% rename from test/symnlinkedConfigs/defaults/service.yaml rename to config_examples/symnlinkedConfigs/defaults/service.yaml diff --git a/test/symnlinkedConfigs/dev/..2018_10_05_08_42_42.488643040/log.yaml b/config_examples/symnlinkedConfigs/dev/..2018_10_05_08_42_42.488643040/log.yaml similarity index 100% rename from test/symnlinkedConfigs/dev/..2018_10_05_08_42_42.488643040/log.yaml rename to config_examples/symnlinkedConfigs/dev/..2018_10_05_08_42_42.488643040/log.yaml diff --git a/test/symnlinkedConfigs/dev/..data b/config_examples/symnlinkedConfigs/dev/..data similarity index 100% rename from test/symnlinkedConfigs/dev/..data rename to config_examples/symnlinkedConfigs/dev/..data diff --git a/test/symnlinkedConfigs/dev/log.yaml b/config_examples/symnlinkedConfigs/dev/log.yaml similarity index 100% rename from test/symnlinkedConfigs/dev/log.yaml rename to config_examples/symnlinkedConfigs/dev/log.yaml diff --git a/test/symnlinkedConfigs/dev/redis.yaml b/config_examples/symnlinkedConfigs/dev/redis.yaml similarity index 100% rename from test/symnlinkedConfigs/dev/redis.yaml rename to config_examples/symnlinkedConfigs/dev/redis.yaml diff --git a/test/symnlinkedConfigs/dev/service.yaml b/config_examples/symnlinkedConfigs/dev/service.yaml similarity index 100% rename from test/symnlinkedConfigs/dev/service.yaml rename to config_examples/symnlinkedConfigs/dev/service.yaml diff --git a/reader_test.go b/reader_test.go index 72a957d..d3dfcd7 100644 --- a/reader_test.go +++ b/reader_test.go @@ -11,7 +11,7 @@ import ( func TestReadConfigs(t *testing.T) { t.Run("Success parsing common dirs and files", func(t *testing.T) { os.Setenv("STAGE", "dev") - configBytes, err := ReadConfigs("./test/configuration") + configBytes, err := ReadConfigs("./config_examples/configuration") if !assert.NoError(t, err) { t.FailNow() } @@ -46,7 +46,7 @@ func TestReadConfigs(t *testing.T) { }) t.Run("Success parsing complex dirs and files", func(t *testing.T) { os.Setenv("STAGE", "development") - configBytes, err := ReadConfigs("./test/configuration2") + configBytes, err := ReadConfigs("./config_examples/configuration2") if !assert.NoError(t, err) { t.FailNow() } @@ -110,7 +110,7 @@ func TestReadConfigs(t *testing.T) { t.Run("Success parsing symlinked files and dirs", func(t *testing.T) { os.Setenv("STAGE", "dev") - configBytes, err := ReadConfigs("./test/symnlinkedConfigs") + configBytes, err := ReadConfigs("./config_examples/symnlinkedConfigs") if !assert.NoError(t, err) { t.FailNow() } @@ -189,13 +189,13 @@ func TestReadConfigs(t *testing.T) { } }) t.Run("no defaults configs", func(t *testing.T) { - _, err := ReadConfigs("./test/no_defaults") + _, err := ReadConfigs("./config_examples/no_defaults") if !assert.Error(t, err) { t.FailNow() } }) t.Run("merge errors", func(t *testing.T) { - _, err := ReadConfigs("./test/merge_error") + _, err := ReadConfigs("./config_examples/merge_error") if !assert.Error(t, err) { t.FailNow() } diff --git a/test/deep/deeper/thedeepest/relative_path_test.go b/test/deep/deeper/thedeepest/relative_path_test.go index 4a90b5b..30fa6f9 100644 --- a/test/deep/deeper/thedeepest/relative_path_test.go +++ b/test/deep/deeper/thedeepest/relative_path_test.go @@ -13,7 +13,7 @@ import ( func TestRelativePath(t *testing.T) { t.Run("Success parsing relative dirs", func(t *testing.T) { os.Setenv("STAGE", "dev") - configBytes, err := config.ReadConfigs("../../../../test/configuration") + configBytes, err := config.ReadConfigs("../../../../config_examples/configuration") if !assert.NoError(t, err) { t.FailNow() }