Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dump cluster kubconfigs and e2e config.yaml when starting an environment. The config.yaml can be used with the e2e framework to run tests using the environment. To test integration quickly, a new e2e environment was added. Example run (using #764): $ (cd test && drenv start envs/e2e.yaml) 2023-08-01 13:36:04,454 INFO [e2e] Starting environment 2023-08-01 13:36:04,506 INFO [dr1] Starting minikube cluster 2023-08-01 13:36:05,534 INFO [dr2] Starting minikube cluster 2023-08-01 13:36:06,525 INFO [hub] Starting minikube cluster 2023-08-01 13:36:40,727 INFO [dr1] Cluster started in 36.22 seconds 2023-08-01 13:36:57,248 INFO [dr2] Cluster started in 51.71 seconds 2023-08-01 13:37:15,228 INFO [hub] Cluster started in 68.70 seconds 2023-08-01 13:37:15,228 INFO [e2e] Dumping ramen e2e config to '/home/nsoffer/.config/drenv/e2e' 2023-08-01 13:37:15,346 INFO [e2e] Environment started in 70.89 seconds # There must be a better way... $ cp ~/.config/drenv/e2e/config.yaml e2e/config/config.yaml $ go test -v ./e2e === RUN TestMain === RUN TestMain/TestConnectionToCluster --- PASS: TestMain (0.02s) --- PASS: TestMain/TestConnectionToCluster (0.01s) PASS ok github.com/red-hat-storage/ramen/e2e 0.025s $ (cd test && drenv delete envs/e2e.yaml) 2023-08-01 13:40:18,575 INFO [e2e] Deleting environment 2023-08-01 13:40:18,576 INFO [dr1] Deleting cluster 2023-08-01 13:40:18,577 INFO [dr2] Deleting cluster 2023-08-01 13:40:18,577 INFO [hub] Deleting cluster 2023-08-01 13:40:19,833 INFO [dr1] Cluster deleted in 1.26 seconds 2023-08-01 13:40:19,838 INFO [hub] Cluster deleted in 1.26 seconds 2023-08-01 13:40:19,839 INFO [dr2] Cluster deleted in 1.26 seconds 2023-08-01 13:40:19,839 INFO [e2e] Removing config /home/nsoffer/.config/drenv/e2e 2023-08-01 13:40:19,840 INFO [e2e] Environment deleted in 1.26 seconds Signed-off-by: Nir Soffer <[email protected]>
- Loading branch information