Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModifyFile ¶
func ModifyFile(path string, modFn FileModifier) error
Types ¶
type CodeChangeTest ¶
type CodeChangeTest struct { // The path to the directory containing the service to test. ServicePath string // The path to the file that we're going to change. CodePath string // The modification that should be made to CodePath. FileChange FileModifier // The expected response before the code is changed. InitialResponseCheck keldaAssert.Assertion // The expected response after the code is changed. ChangedResponseCheck keldaAssert.Assertion }
CodeChangeTest tests that Kelda properly syncs files by modifying a file, and checking the HTTP response.
func (CodeChangeTest) Test ¶
func (test CodeChangeTest) Test(ctx context.Context, t *testing.T, helper *util.TestHelper)
type ExampleTest ¶
type ExampleTest struct { // The services that we expect to get deployed from the Workspace. ExpectedServices []string // The services that should be run in development mode. DevServices []string // Additional tunnels to add to the Workspace. Tunnels []config.Tunnel CodeChangeTests []CodeChangeTest }
ExampleTest is used for testing our example applications.
func (ExampleTest) Test ¶
func (test ExampleTest) Test(t *testing.T, helper *util.TestHelper)
type FileModifier ¶
func DeleteLine ¶
func DeleteLine(linesToDelete ...int) FileModifier
func Replace ¶
func Replace(currStr, newStr string) FileModifier
Click to show internal directories.
Click to hide internal directories.