MCPcopy
hub / github.com/feast-dev/feast / TestStartHttpServer

Function TestStartHttpServer

go/main_test.go:44–58  ·  view source on GitHub ↗

TestStartHttpServer tests the StartHttpServer function

(t *testing.T)

Source from the content-addressed store, hash-verified

42
43// TestStartHttpServer tests the StartHttpServer function
44func 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
61func TestStartGrpcServer(t *testing.T) {

Callers

nothing calls this directly

Calls 1

StartHttpServerMethod · 0.65

Tested by

no test coverage detected