Skip to content

warehouse-13/safety

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

safety

A "real" server to use when doing acceptance level testing/sanity checking of things which interact with flintlock.

Use this when you don't necessarily care what flintlock should do, you just care that it is being asked to do something.

As a local server

This will start a server on localhost:9090 or whichever port you set with --port.

git clone https://github.com/warehouse-13/safety
cd safety
make build
./safety-on

As a test server

This will start a server on a real network with a randomly assigned port.

server := fakeserver.New()
address := server.Start("")
// use the address for something
defer server.Stop()

As a programmatic test server

This will start a server on a fake network (buffer).

server := fakeserver.New()
dialer := server.StartBuf("")
defer server.Stop()

conn, _ := grpc.DialContext(context.TODO, "bufnet", grpc.WithContextDialer(dialer), grpc.WithInsecure())
defer conn.Close()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published