Skip to content

Commit

Permalink
move test configs to a separate folder to avoid them to appear in go.…
Browse files Browse the repository at this point in the history
…mod archive (unzip error with double dots)
  • Loading branch information
smgladkovskiy committed Apr 30, 2020
1 parent 15c64bf commit b3f073d
Show file tree
Hide file tree
Showing 24 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down Expand Up @@ -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()
}
Expand Down Expand Up @@ -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()
}
Expand Down Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion test/deep/deeper/thedeepest/relative_path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit b3f073d

Please sign in to comment.