grpc: removed set node service file, achieved with start session, removed get node config service configs, achieved with get session
This commit is contained in:
parent
3e2cb86b6b
commit
e299d3dd16
6 changed files with 1 additions and 117 deletions
|
@ -27,7 +27,6 @@ from core.api.grpc.wrappers import (
|
|||
NodeType,
|
||||
Position,
|
||||
ServiceAction,
|
||||
ServiceFileConfig,
|
||||
ServiceValidationMode,
|
||||
SessionLocation,
|
||||
SessionState,
|
||||
|
@ -737,26 +736,6 @@ class TestGrpcw:
|
|||
# then
|
||||
assert data is not None
|
||||
|
||||
def test_set_node_service_file(self, grpc_server: CoreGrpcServer):
|
||||
# given
|
||||
client = CoreGrpcClient()
|
||||
session = grpc_server.coreemu.create_session()
|
||||
node = session.add_node(CoreNode)
|
||||
config = ServiceFileConfig(
|
||||
node.id, "DefaultRoute", "defaultroute.sh", "echo hello"
|
||||
)
|
||||
|
||||
# then
|
||||
with client.context_connect():
|
||||
result = client.set_node_service_file(session.id, config)
|
||||
|
||||
# then
|
||||
assert result is True
|
||||
service_file = session.services.get_service_file(
|
||||
node, config.service, config.file
|
||||
)
|
||||
assert service_file.data == config.data
|
||||
|
||||
def test_service_action(self, grpc_server: CoreGrpcServer):
|
||||
# given
|
||||
client = CoreGrpcClient()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue