(t *testing.T)
| 335 | } |
| 336 | |
| 337 | func TestRunTwice(t *testing.T) { |
| 338 | ctx := context.Background() |
| 339 | r := fstest.NewRun(t) |
| 340 | err := transform.SetOptions(ctx, "dir,prefix=tac", "dir,prefix=tic") |
| 341 | require.NoError(t, err) |
| 342 | file1 := r.WriteFile("toe/toe/toe.txt", "hello world", t1) |
| 343 | |
| 344 | r.Mkdir(ctx, r.Fremote) |
| 345 | ctx = predictDstFromLogger(ctx) |
| 346 | err = Sync(ctx, r.Fremote, r.Flocal, true) |
| 347 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) |
| 348 | require.NoError(t, err) |
| 349 | |
| 350 | r.CheckLocalItems(t, file1) |
| 351 | r.CheckRemoteItems(t, fstest.NewItem("tictactoe/tictactoe/toe.txt", "hello world", t1)) |
| 352 | |
| 353 | // result should not change second time, since src is unchanged |
| 354 | ctx = predictDstFromLogger(ctx) |
| 355 | err = Sync(ctx, r.Fremote, r.Flocal, true) |
| 356 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) |
| 357 | require.NoError(t, err) |
| 358 | |
| 359 | r.CheckLocalItems(t, file1) |
| 360 | r.CheckRemoteItems(t, fstest.NewItem("tictactoe/tictactoe/toe.txt", "hello world", t1)) |
| 361 | } |
| 362 | |
| 363 | func TestSyntax(t *testing.T) { |
| 364 | ctx := context.Background() |
nothing calls this directly
no test coverage detected
searching dependent graphs…