Tests fetching from the local asset directory without cache. This gives us a baseline for the following tests and lets us debug our test infrastructure without extra complications.
| 633 | // gives us a baseline for the following tests and lets us debug our |
| 634 | // test infrastructure without extra complications. |
| 635 | TEST_F(FetcherCacheTest, LocalUncached) |
| 636 | { |
| 637 | startSlave(); |
| 638 | driver->start(); |
| 639 | |
| 640 | const int index = 0; |
| 641 | CommandInfo::URI uri; |
| 642 | uri.set_value(commandPath); |
| 643 | uri.set_executable(true); |
| 644 | |
| 645 | CommandInfo commandInfo; |
| 646 | commandInfo.set_value("./" + COMMAND_NAME + " " + taskName(index)); |
| 647 | commandInfo.add_uris()->CopyFrom(uri); |
| 648 | |
| 649 | const Try<Task> task = launchTask(commandInfo, index); |
| 650 | ASSERT_SOME(task); |
| 651 | |
| 652 | AWAIT_READY(awaitFinished(task.get())); |
| 653 | |
| 654 | EXPECT_EQ(0u, fetcherProcess->cacheSize()); |
| 655 | ASSERT_SOME(fetcherProcess->cacheFiles()); |
| 656 | EXPECT_TRUE(fetcherProcess->cacheFiles()->empty()); |
| 657 | |
| 658 | const string path = path::join(task->runDirectory.string(), COMMAND_NAME); |
| 659 | EXPECT_TRUE(isExecutable(path)); |
| 660 | EXPECT_TRUE(os::exists(path + taskName(index))); |
| 661 | } |
| 662 | |
| 663 | |
| 664 | // Tests fetching from the local asset directory with simple caching. |
nothing calls this directly
no test coverage detected