(baseParams api.BaseParams, ts ...testing.TB)
| 663 | } |
| 664 | |
| 665 | func waitForStartup(baseParams api.BaseParams, ts ...testing.TB) (*cluster.Smap, error) { |
| 666 | for { |
| 667 | smap, err := api.GetClusterMap(baseParams) |
| 668 | if err != nil { |
| 669 | if api.HTTPStatus(err) == http.StatusServiceUnavailable { |
| 670 | tlog.Logln("waiting for the cluster to start up...") |
| 671 | time.Sleep(waitClusterStartup) |
| 672 | continue |
| 673 | } |
| 674 | |
| 675 | tlog.Logf("unable to get usable cluster map, err: %v\n", err) |
| 676 | if len(ts) > 0 { |
| 677 | tassert.CheckFatal(ts[0], err) |
| 678 | } |
| 679 | return nil, err |
| 680 | } |
| 681 | return smap, nil |
| 682 | } |
| 683 | } |
no test coverage detected