2323
2424# Tests require manual setup before executing.
2525#
26- # Prior to running these tests, create four dbt projects:
26+ # Prior to running these tests, create six dbt projects:
2727#
2828# 1. `dbt init test_cloud_options`
2929# - accept all default options
3737# - accept all default options
3838# - provide any value for mandatory options
3939#
40- # 4. `dbt init test_enterprise_catalog_options`
40+ # 4. `dbt init test_sw_enterprise_catalog_pat_options`
41+ # - select software_with_pat
4142# - select enterprise catalog storage option
43+ # - select PAT authentication
4244# - accept all default options
4345# - provide any value for mandatory options
4446#
47+ # 5. `dbt init test_sw_enterprise_catalog_up_options`
48+ # - select software_with_username_password
49+ # - select enterprise catalog storage option
50+ # - select username/password authentication
51+ # - accept all default options
52+ # - provide any value for mandatory options
53+ #
54+ # 6. `dbt init test_cloud_enterprise_catalog_options`
55+ # - select cloud
56+ # - select enterprise catalog storage option
57+ # - accept all default options
58+ # - provide any value for mandatory options
4559# These tests assumes there exists a $HOME/.dbt/profiles.yml
46- # file containing these four dbt projects.
60+ # file containing these six dbt projects.
4761
4862
4963class TestProfileTemplate :
@@ -58,7 +72,9 @@ class TestProfileTemplate:
5872 "test_sw_up_options" # nosec hardcoded_password_string
5973 )
6074 _TEST_SOFTWARE_PAT_PROFILE_PROJECT = "test_sw_pat_options"
61- _TEST_ENTERPRISE_CATALOG_PROFILE_PROJECT = "test_enterprise_catalog_options"
75+ _TEST_SW_ENTERPRISE_CATALOG_PAT_PROFILE_PROJECT = "test_sw_enterprise_catalog_pat_options"
76+ _TEST_SW_ENTERPRISE_CATALOG_USER_PASSWORD_PROFILE_PROJECT = "test_sw_enterprise_catalog_up_options"
77+ _TEST_CLOUD_ENTERPRISE_CATALOG_PROFILE_PROJECT = "test_cloud_enterprise_catalog_options"
6278
6379 _PASSWORD_AUTH_PROFILE_OPTIONS_WITH_DEFAULTS = {"password" : None }
6480 _PAT_AUTH_PROFILE_OPTIONS_WITH_DEFAULTS = {"pat" : None }
@@ -79,13 +95,18 @@ class TestProfileTemplate:
7995 "port" : 9047 ,
8096 "use_ssl" : False ,
8197 }
82- _ENTERPRISE_CATALOG_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS = {
98+ _DREMIO_SW_ENTERPRISE_CATALOG_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS = {
8399 "enterprise_catalog_namespace" : None ,
84100 "enterprise_catalog_folder" : None ,
85101 "software_host" : None ,
86102 "port" : 9047 ,
87103 "use_ssl" : False ,
88104 }
105+ _DREMIO_CLOUD_ENTERPRISE_CATALOG_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS = {
106+ "enterprise_catalog_namespace" : None ,
107+ "enterprise_catalog_folder" : None ,
108+ "use_ssl" : False ,
109+ }
89110
90111 _DREMIO_CLOUD_PROFILE_OPTIONS_WITH_DEFAULTS = (
91112 _COMMON_PROFILE_OPTIONS_WITH_DEFAULTS
@@ -102,14 +123,19 @@ class TestProfileTemplate:
102123 | _DREMIO_SW_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS
103124 | _PAT_AUTH_PROFILE_OPTIONS_WITH_DEFAULTS
104125 )
105- _DREMIO_ENTERPRISE_CATALOG_USERNAME_PASSWORD_PROFILE_OPTIONS = (
126+ _DREMIO_SW_ENTERPRISE_CATALOG_USERNAME_PASSWORD_PROFILE_OPTIONS = (
106127 _COMMON_PROFILE_OPTIONS_WITH_DEFAULTS
107- | _ENTERPRISE_CATALOG_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS
128+ | _DREMIO_SW_ENTERPRISE_CATALOG_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS
108129 | _PASSWORD_AUTH_PROFILE_OPTIONS_WITH_DEFAULTS
109130 )
110- _DREMIO_ENTERPRISE_CATALOG_PAT_PROFILE_OPTIONS = (
131+ _DREMIO_SW_ENTERPRISE_CATALOG_PAT_PROFILE_OPTIONS = (
132+ _COMMON_PROFILE_OPTIONS_WITH_DEFAULTS
133+ | _DREMIO_SW_ENTERPRISE_CATALOG_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS
134+ | _PAT_AUTH_PROFILE_OPTIONS_WITH_DEFAULTS
135+ )
136+ _DREMIO_CLOUD_ENTERPRISE_CATALOG_PROFILE_OPTIONS_WITH_DEFAULTS = (
111137 _COMMON_PROFILE_OPTIONS_WITH_DEFAULTS
112- | _ENTERPRISE_CATALOG_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS
138+ | _DREMIO_CLOUD_ENTERPRISE_CATALOG_PROFILE_SPECIFIC_OPTIONS_WITH_DEFAULTS
113139 | _PAT_AUTH_PROFILE_OPTIONS_WITH_DEFAULTS
114140 )
115141
@@ -124,8 +150,8 @@ class TestProfileTemplate:
124150 }
125151
126152 @pytest .mark .skipif (
127- DREMIO_EDITION == "community " ,
128- reason = "Cloud options are not available in Dremio community edition." ,
153+ DREMIO_EDITION != "cloud " ,
154+ reason = "Cloud options are not available in Dremio community/enterprise edition." ,
129155 )
130156 def test_cloud_options (self ) -> None :
131157 self ._test_project_profile_options (
@@ -156,13 +182,33 @@ def test_aliases(self) -> None:
156182
157183
158184 @pytest .mark .skipif (
159- DREMIO_EDITION == "community" ,
160- reason = "Enterprise catalog options are not available in Dremio community edition." ,
185+ DREMIO_EDITION != "enterprise" ,
186+ reason = "Dremio Software enterprise catalog options are specific to Dremio Enterprise edition." ,
187+ )
188+ def test_sw_enterprise_catalog_username_password_options (self ) -> None :
189+ self ._test_project_profile_options (
190+ self ._get_dbt_test_project_dict (self ._TEST_SW_ENTERPRISE_CATALOG_USER_PASSWORD_PROFILE_PROJECT ),
191+ self ._DREMIO_SW_ENTERPRISE_CATALOG_USERNAME_PASSWORD_PROFILE_OPTIONS ,
192+ )
193+
194+ @pytest .mark .skipif (
195+ DREMIO_EDITION != "enterprise" ,
196+ reason = "Dremio Software enterprise catalog options are specific to Dremio Enterprise edition." ,
197+ )
198+ def test_sw_enterprise_catalog_pat_options (self ) -> None :
199+ self ._test_project_profile_options (
200+ self ._get_dbt_test_project_dict (self ._TEST_SW_ENTERPRISE_CATALOG_PAT_PROFILE_PROJECT ),
201+ self ._DREMIO_SW_ENTERPRISE_CATALOG_PAT_PROFILE_OPTIONS ,
202+ )
203+
204+ @pytest .mark .skipif (
205+ DREMIO_EDITION != "cloud" ,
206+ reason = "Dremio Software enterprise catalog options are specific to Dremio Enterprise edition." ,
161207 )
162- def test_enterprise_catalog_options (self ) -> None :
208+ def test_cloud_enterprise_catalog_options (self ) -> None :
163209 self ._test_project_profile_options (
164- self ._get_dbt_test_project_dict (self ._TEST_ENTERPRISE_CATALOG_PROFILE_PROJECT ),
165- self ._DREMIO_ENTERPRISE_CATALOG_PROFILE_OPTIONS ,
210+ self ._get_dbt_test_project_dict (self ._TEST_CLOUD_ENTERPRISE_CATALOG_PROFILE_PROJECT ),
211+ self ._DREMIO_CLOUD_ENTERPRISE_CATALOG_PROFILE_OPTIONS_WITH_DEFAULTS ,
166212 )
167213
168214 @pytest .mark .skip
0 commit comments