(t *testing.T)
| 38 | ) |
| 39 | |
| 40 | func TestServer(t *testing.T) { |
| 41 | ctx, env := repotesting.NewEnvironment(t, repotesting.FormatNotImportant) |
| 42 | apiServerInfo := servertesting.StartServer(t, env, true) |
| 43 | |
| 44 | ctx2, cancel := context.WithCancel(ctx) |
| 45 | |
| 46 | rep, err := servertesting.ConnectAndOpenAPIServer(t, ctx2, apiServerInfo, repo.ClientOptions{ |
| 47 | Username: servertesting.TestUsername, |
| 48 | Hostname: servertesting.TestHostname, |
| 49 | }, content.CachingOptions{ |
| 50 | CacheDirectory: testutil.TempDirectory(t), |
| 51 | ContentCacheSizeBytes: maxCacheSizeBytes, |
| 52 | }, servertesting.TestPassword, &repo.Options{}) |
| 53 | |
| 54 | // cancel immediately to ensure we did not spawn goroutines that depend on ctx inside |
| 55 | // repo.OpenAPIServer() |
| 56 | cancel() |
| 57 | |
| 58 | require.NoError(t, err) |
| 59 | |
| 60 | defer rep.Close(ctx) |
| 61 | |
| 62 | remoteRepositoryTest(ctx, t, rep) |
| 63 | remoteRepositoryNotificationTest(t, ctx, rep, env.RepositoryWriter) |
| 64 | } |
| 65 | |
| 66 | func TestGRPCServer_AuthenticationError(t *testing.T) { |
| 67 | ctx, env := repotesting.NewEnvironment(t, repotesting.FormatNotImportant) |
nothing calls this directly
no test coverage detected