MCPcopy Create free account
hub / github.com/coder/coder / TestServer_StartStop

Function TestServer_StartStop

scaletest/smtpmock/server_test.go:21–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19)
20
21func TestServer_StartStop(t *testing.T) {
22 t.Parallel()
23
24 ctx := context.Background()
25 srv := new(smtpmock.Server)
26 err := srv.Start(ctx, smtpmock.Config{
27 HostAddress: "127.0.0.1",
28 SMTPPort: 0,
29 APIPort: 0,
30 Logger: slogtest.Make(t, nil),
31 })
32 require.NoError(t, err)
33 require.NotEmpty(t, srv.SMTPAddress())
34 require.NotEmpty(t, srv.APIAddress())
35
36 err = srv.Stop()
37 require.NoError(t, err)
38}
39
40func TestServer_SendAndReceiveEmail(t *testing.T) {
41 t.Parallel()

Callers

nothing calls this directly

Calls 5

NotEmptyMethod · 0.80
SMTPAddressMethod · 0.80
StartMethod · 0.65
StopMethod · 0.65
APIAddressMethod · 0.45

Tested by

no test coverage detected