TestStartHttpServer tests the StartHttpServer function
(t *testing.T)
| 42 | |
| 43 | // TestStartHttpServer tests the StartHttpServer function |
| 44 | func TestStartHttpServer(t *testing.T) { |
| 45 | mockServerStarter := new(MockServerStarter) |
| 46 | fs := &feast.FeatureStore{} |
| 47 | host := "localhost" |
| 48 | port := 8080 |
| 49 | var writeLoggedFeaturesCallback logging.OfflineStoreWriteCallback |
| 50 | |
| 51 | loggingOpts := &logging.LoggingOptions{} |
| 52 | |
| 53 | mockServerStarter.On("StartHttpServer", fs, host, port, 9090, mock.AnythingOfType("logging.OfflineStoreWriteCallback"), loggingOpts).Return(nil) |
| 54 | |
| 55 | err := mockServerStarter.StartHttpServer(fs, host, port, 9090, writeLoggedFeaturesCallback, loggingOpts) |
| 56 | assert.NoError(t, err) |
| 57 | mockServerStarter.AssertExpectations(t) |
| 58 | } |
| 59 | |
| 60 | // TestStartGrpcServer tests the StartGrpcServer function |
| 61 | func TestStartGrpcServer(t *testing.T) { |
nothing calls this directly
no test coverage detected