# Path: scar/parser/fdl.py
# FAAS_PROVIDERS = ["aws", "oscar"]
# def merge_conf(conf: Dict, yaml: Dict) -> Dict:
# def merge_cmd_yaml(cmd: Dict, yaml: Dict) -> Dict:


import unittest
from scar.parser.fdl import FDLParser
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



class Test(unittest.TestCase):

    def testFDL(self):
        ''' Expected return value (except random ids):
        [{'env_vars':{
            'STORAGE_AUTH_MINIO_PASS_TMPXCMCNA9S': 'mpass',
            'STORAGE_AUTH_MINIO_USER_TMPXCMCNA9S': 'muser',
            'STORAGE_PATH_INPUT_TMPOTOWSDYE': 's3-bucket/test1',
            'STORAGE_PATH_INPUT_TMPXCMCNA9S': 'my-bucket/test',
            'STORAGE_PATH_OUTPUT_TMPOTOWSDYE': 's3-bucket/test1-output',
            'STORAGE_PATH_OUTPUT_TMPXCMCNA9S': 'my-bucket/test-output',
            'STORAGE_PATH_SUFIX_TMPOTOWSDYE': 'avi',
            'STORAGE_PATH_SUFIX_TMPXCMCNA9S': 'wav:srt'},
          'name': 'function1'},
         {'env_vars': {
            'STORAGE_AUTH_MINIO_PASS_TMPXCMCNA9S': 'mpass',
            'STORAGE_AUTH_MINIO_USER_TMPXCMCNA9S': 'muser',
            'STORAGE_PATH_INPUT_TMPXCMCNA9S': 'my-bucket2/test',
            'STORAGE_PATH_OUTPUT_TMPXCMCNA9S': 'my-bucket2/test-output',
            'STORAGE_PATH_PREFIX_TMPXCMCNA9S': 'my_file'},
          'name': 'function2'}]
        '''

# Path: scar/parser/fdl.py
# FAAS_PROVIDERS = ["aws", "oscar"]
# def merge_conf(conf: Dict, yaml: Dict) -> Dict:
# def merge_cmd_yaml(cmd: Dict, yaml: Dict) -> Dict:


# Path: test/functional/parser/fdl.py
import unittest
from scar.parser.fdl import FDLParser

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



class Test(unittest.TestCase):

    def testFDL(self):
        ''' Expected return value (except random ids):
        [{'env_vars':{
            'STORAGE_AUTH_MINIO_PASS_TMPXCMCNA9S': 'mpass',
            'STORAGE_AUTH_MINIO_USER_TMPXCMCNA9S': 'muser',
            'STORAGE_PATH_INPUT_TMPOTOWSDYE': 's3-bucket/test1',
            'STORAGE_PATH_INPUT_TMPXCMCNA9S': 'my-bucket/test',
            'STORAGE_PATH_OUTPUT_TMPOTOWSDYE': 's3-bucket/test1-output',
            'STORAGE_PATH_OUTPUT_TMPXCMCNA9S': 'my-bucket/test-output',
            'STORAGE_PATH_SUFIX_TMPOTOWSDYE': 'avi',
            'STORAGE_PATH_SUFIX_TMPXCMCNA9S': 'wav:srt'},
          'name': 'function1'},
         {'env_vars': {
            'STORAGE_AUTH_MINIO_PASS_TMPXCMCNA9S': 'mpass',
            'STORAGE_AUTH_MINIO_USER_TMPXCMCNA9S': 'muser',
            'STORAGE_PATH_INPUT_TMPXCMCNA9S': 'my-bucket2/test',
            'STORAGE_PATH_OUTPUT_TMPXCMCNA9S': 'my-bucket2/test-output',
            'STORAGE_PATH_PREFIX_TMPXCMCNA9S': 'my_file'},
          'name': 'function2'}]
        '''

        result = FDLParser().parse_yaml('fdl.yaml')