remove_test.go:149:
Error Trace: /home/runner/work/cli/cli/pkg/cmd/profile/remove/remove_test.go:149
Error: Not equal:
expected: "✓ 'foo' removed successfully.\n"
actual : "✓ 'foo' removed successfully. Set a new default profile with 'algolia profile setdefault'.\n"
Diff:
--- Expected
+++ Actual
@@ -1,2 +1,2 @@
-✓ 'foo' removed successfully.
+✓ 'foo' removed successfully. Set a new default profile with 'algolia profile setdefault'.
Test: Test_runRemoveCmd/existing_profile_(non-default)
This test is flaky due to the go maps which doesn't have a predictable order and the function test.NewConfigStubWithProfiles relies on the order to define the profile used. This PR leverages a slice to have a predictable ordering
Summary
Fix flaky test:
This test is flaky due to the go maps which doesn't have a predictable order and the function
test.NewConfigStubWithProfiles
relies on the order to define the profile used. This PR leverages a slice to have a predictable ordering