Re-organise folders structure
Strech opened this issue · comments
To follow best practices and allow us to have a better ability to test and develop new features, I would like to open discussion around packages reorganisation
toxiproxy/
├── bin/
├── cmd/
│ ├── cli/
│ │ └── main.go
│ ├── server/
│ │ └── main.go
│ └── dashboard
│ └── main.go
├── pkg/
│ ├── client/
│ │ └── ...
│ ├── server/
│ │ └── ...
│ ├── dashboard/
│ │ └── ...
│ └── toxics/
│ │ └── ...
│ └── stream/
│ │ └── ...
│ └── e2e/ (renamed `testing` see below)
│ │ └── ...
│ └── toxiproxytest/ (renamed `testhelper` see: https://pkg.go.dev/net/http/httptest)
│ │ └── ...
├── ...
└── README.md
Also I think it makes sense to restructure testing
folder, since one of the files endpoint
is used in Makefile
to run e2e
(maybe we just should rename it to be e2e/main.go
) and benchmark_test.go
is used only for benchmarking also in e2e tests.
Another way to rearrange files around testing is to rename bin
folder into test
and move there testing folder too (inspiration https://github.com/kubernetes-sigs/descheduler/tree/master/test)
=== before
toxiptoxy/
├── bin/
│ ├── e2e
│ └── release_test
├── testing/
│ ├── benchmark_test.go
│ └── endpoint.go
...
=== after
toxiptoxy/
├── test/
│ ├── e2e/
│ │ ├── benchmark_test.go
│ │ └── endpoint.go
│ ├── run-e2e-tests
│ └── run-release-tests
...
Agreed structure for testing
toxiptoxy/
├── scripts/
│ ├── test-e2e
│ └── test-release
├── test/
│ ├── e2e/
│ │ ├── benchmark_test.go
│ │ └── endpoint.go
...