Use git utils from cas API
Test framework does no longer provide git_utils, so we switch to local implementation. Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
21
test/functional/api/cas/git.py
Normal file
21
test/functional/api/cas/git.py
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# Copyright(c) 2019 Intel Corporation
|
||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
#
|
||||
|
||||
from core.test_run import TestRun
|
||||
from connection.local_executor import LocalExecutor
|
||||
|
||||
|
||||
def get_current_commit_hash():
|
||||
local_executor = LocalExecutor()
|
||||
return local_executor.run(
|
||||
f"cd {TestRun.plugins['opencas']['repo_dir']} &&"
|
||||
f'git show HEAD --pretty=format:"%H"').stdout
|
||||
|
||||
|
||||
def get_current_commit_message():
|
||||
local_executor = LocalExecutor()
|
||||
return local_executor.run(
|
||||
f"cd {TestRun.plugins['opencas']['repo_dir']} &&"
|
||||
f'git show HEAD --pretty=format:"%s"').stdout
|
Reference in New Issue
Block a user