-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Backfill basic integ tests / Refactor integ tests to use Console …
…Library (#759) --Add Backfill basic integ tests Lays the groundwork for generic backfill integration tests (usable across any backfill migration) that operate by using the Console Library. These tests currently expect a single execution flow of a backfill migration, that is all data will be preloaded onto the source cluster as needed by the different tests, the backfill migration will be kicked off, and the test cases will verify the result. This keeps the execution time at a reasonable rate (not starting,stopping containers multiple times) for our common tests, with my expectation being that in the future we have more targeted tests cases which need to control this flow and can operate independently. --Refactor all integ tests to use Console Library This change involved moving our integ tests to be a library on the Migration Console. Since we do plan on having the Migration Console execute these tests this does make some sense, but the larger goals this enables were to be able to have these tests available from startup on the Migration Console (allowing us to remove some troublesome code that tries to pull this with git) as well as allow these tests to easily make use of the Console Library for performing operations (a desperately needed addition to our tests) --------- Signed-off-by: Tanner Lewis <[email protected]>
- Loading branch information
Showing
38 changed files
with
2,089 additions
and
944 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,087 changes: 1,069 additions & 18 deletions
1,087
TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/Pipfile.lock
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.../src/main/docker/migrationConsole/lib/console_link/console_link/models/replayer_docker.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from typing import Dict | ||
from console_link.models.command_result import CommandResult | ||
from console_link.models.replayer_base import Replayer, ReplayStatus | ||
|
||
import logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class DockerReplayer(Replayer): | ||
def __init__(self, config: Dict) -> None: | ||
super().__init__(config) | ||
|
||
def start(self, *args, **kwargs) -> CommandResult: | ||
logger.warning("Start command is not implemented for Docker Replayer") | ||
return CommandResult(success=True, value="No action performed, action is unimplemented") | ||
|
||
def stop(self, *args, **kwargs) -> CommandResult: | ||
logger.warning("Stop command is not implemented for Docker Replayer") | ||
return CommandResult(success=True, value="No action performed, action is unimplemented") | ||
|
||
def get_status(self, *args, **kwargs) -> CommandResult: | ||
logger.warning("Get status command is not implemented for Docker Replayer and " | ||
"always assumes service is running") | ||
return CommandResult(True, (ReplayStatus.RUNNING, "Docker Replayer is assumed to be running")) | ||
|
||
def scale(self, units: int, *args, **kwargs) -> CommandResult: | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.