File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
perfkitbenchmarker/providers/gcp Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,18 @@ def _Create(self):
4646 'trino' ,
4747 'https://trinodb.github.io/charts' ,
4848 ]
49+ yaml_config = {
50+ 'server' : {
51+ 'workers' : self .node_count ,
52+ }
53+ }
54+ filename = vm_util .WriteYaml ([yaml_config ])
4955 vm_util .IssueCommand (cmd )
5056 cmd = [
5157 'helm' ,
5258 'install' ,
59+ '-f' ,
60+ filename ,
5361 self .name ,
5462 'trino/trino' ,
5563 '--kubeconfig' ,
Original file line number Diff line number Diff line change 33from absl import flags
44from absl .testing import flagsaver
55import mock
6+ from perfkitbenchmarker import vm_util
67from perfkitbenchmarker .providers .gcp import trino
78from tests import pkb_common_test_case
89
@@ -35,6 +36,13 @@ def testBuildAndCompile(self):
3536 self .assertEqual (db .name , 'pkb-123' )
3637
3738 def testCreate (self ):
39+ self .enter_context (
40+ mock .patch .object (
41+ vm_util ,
42+ 'WriteTemporaryFile' ,
43+ return_value = 'trino.yaml' ,
44+ )
45+ )
3846 db = trino .Trino (EDW_SERVICE_SPEC )
3947 mock_cmd = self .MockIssueCommand ({'' : [('' , '' , 0 )]})
4048 db ._Create ()
@@ -49,6 +57,8 @@ def testCreate(self):
4957 mock .call ([
5058 'helm' ,
5159 'install' ,
60+ '-f' ,
61+ 'trino.yaml' ,
5262 'pkb-123' ,
5363 'trino/trino' ,
5464 '--kubeconfig' ,
You can’t perform that action at this time.
0 commit comments