@@ -89,7 +89,7 @@ def get_test_class_dir(cls) -> Path:
8989    @classmethod  
9090    def  create_connector (
9191        cls ,
92-         scenario : ConnectorTestScenario ,
92+         scenario : ConnectorTestScenario   |   None ,
9393    ) ->  IConnector :
9494        """Instantiate the connector class.""" 
9595        connector  =  cls .connector   # type: ignore 
@@ -147,28 +147,35 @@ def get_scenarios(
147147        This has to be a separate function because pytest does not allow 
148148        parametrization of fixtures with arguments from the test class itself. 
149149        """ 
150-         category  =  "connection" 
150+         categories  =  [ "connection" ,  "spec" ] 
151151        all_tests_config  =  yaml .safe_load (cls .acceptance_test_config_path .read_text ())
152152        if  "acceptance_tests"  not  in all_tests_config :
153153            raise  ValueError (
154154                f"Acceptance tests config not found in { cls .acceptance_test_config_path }  
155155                f" Found only: { str (all_tests_config )}  
156156            )
157-         if  category  not  in all_tests_config ["acceptance_tests" ]:
158-             return  []
159-         if  "tests"  not  in all_tests_config ["acceptance_tests" ][category ]:
160-             raise  ValueError (f"No tests found for category { category }  )
161- 
162-         tests_scenarios  =  [
163-             ConnectorTestScenario .model_validate (test )
164-             for  test  in  all_tests_config ["acceptance_tests" ][category ]["tests" ]
165-             if  "iam_role"  not  in test ["config_path" ]
166-         ]
157+ 
158+         test_scenarios : list [ConnectorTestScenario ] =  []
159+         for  category  in  categories :
160+             if  (
161+                 category  not  in all_tests_config ["acceptance_tests" ]
162+                 or  "tests"  not  in all_tests_config ["acceptance_tests" ][category ]
163+             ):
164+                 continue 
165+ 
166+             test_scenarios .extend (
167+                 [
168+                     ConnectorTestScenario .model_validate (test )
169+                     for  test  in  all_tests_config ["acceptance_tests" ][category ]["tests" ]
170+                     if  "config_path"  in  test  and  "iam_role"  not  in test ["config_path" ]
171+                 ]
172+             )
173+ 
167174        connector_root  =  cls .get_connector_root_dir ().absolute ()
168-         for  test  in  tests_scenarios :
175+         for  test  in  test_scenarios :
169176            if  test .config_path :
170177                test .config_path  =  connector_root  /  test .config_path 
171178            if  test .configured_catalog_path :
172179                test .configured_catalog_path  =  connector_root  /  test .configured_catalog_path 
173180
174-         return  tests_scenarios 
181+         return  test_scenarios 
0 commit comments