Skip to content

Commit 0073f14

Browse files
authored
AMBARI-26474: Fix ambari server py test (#4007)
1 parent 21d82e7 commit 0073f14

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ambari-server/src/test/python/custom_actions/TestCheckHost.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def testDBConnectionCheck(
118118
"user_passwd": "test_user_passwd",
119119
"jdk_name": "test_jdk_name",
120120
},
121-
"ambariLevelParams": {"custom_mysql_jdbc_name": "mysql-connector-java.jar"},
121+
"ambariLevelParams": {"custom_mysql_jdbc_name": "mysql-connector-java.jar","ambari_java_home": "test_java_home"},
122122
"agentLevelParams": {"agentCacheDir": "/nonexistent_tmp"},
123123
}
124124
get_tmp_dir_mock.return_value = "/tmp"
@@ -158,7 +158,7 @@ def testDBConnectionCheck(
158158
"jdk_name": "test_jdk_name",
159159
},
160160
"agentLevelParams": {"agentCacheDir": "/nonexistent_tmp"},
161-
"ambariLevelParams": {"custom_oracle_jdbc_name": "oracle-jdbc-driver.jar"},
161+
"ambariLevelParams": {"custom_oracle_jdbc_name": "oracle-jdbc-driver.jar","ambari_java_home": "test_java_home"},
162162
}
163163
format_mock.reset_mock()
164164
download_file_mock.reset_mock()
@@ -197,7 +197,7 @@ def testDBConnectionCheck(
197197
"jdk_name": "test_jdk_name",
198198
},
199199
"agentLevelParams": {"agentCacheDir": "/nonexistent_tmp"},
200-
"ambariLevelParams": {"custom_postgres_jdbc_name": "oracle-jdbc-driver.jar"},
200+
"ambariLevelParams": {"custom_postgres_jdbc_name": "oracle-jdbc-driver.jar","ambari_java_home": "test_java_home"},
201201
}
202202
format_mock.reset_mock()
203203
download_file_mock.reset_mock()
@@ -251,7 +251,7 @@ def testDBConnectionCheck(
251251
"db_name": "postgres",
252252
},
253253
"agentLevelParams": {"agentCacheDir": "/nonexistent_tmp"},
254-
"ambariLevelParams": {"custom_postgres_jdbc_name": "test-postgres-jdbc.jar"},
254+
"ambariLevelParams": {"custom_postgres_jdbc_name": "test-postgres-jdbc.jar","ambari_java_home": "test_java_home"},
255255
}
256256

257257
isfile_mock.return_value = False
@@ -615,6 +615,7 @@ def testUnsupportedDatabaseType(
615615
"agentCacheDir": "/nonexistent_tmp",
616616
"custom_mysql_jdbc_name": "mysql-connector-java.jar",
617617
},
618+
"ambariLevelParams": {"ambari_java_home": "test_java_home"},
618619
}
619620
get_tmp_dir_mock.return_value = "/tmp"
620621
download_file_mock.side_effect = Exception("test exception")

0 commit comments

Comments
 (0)