@@ -42,6 +42,8 @@ describe('PackageInstallerE2E', () => {
42
42
argv [ flags . nodeIDs . name ] = 'node0'
43
43
argv [ flags . clusterName . name ] = TEST_CLUSTER
44
44
argv [ flags . fstChartVersion . name ] = version . FST_CHART_VERSION
45
+ argv [ flags . generateGossipKeys . name ] = true
46
+ argv [ flags . generateTlsKeys . name ] = true
45
47
// set the env variable SOLO_FST_CHARTS_DIR if developer wants to use local FST charts
46
48
argv [ flags . chartDirectory . name ] = process . env . SOLO_FST_CHARTS_DIR ? process . env . SOLO_FST_CHARTS_DIR : undefined
47
49
const bootstrapResp = bootstrapNetwork ( namespace , argv , undefined , undefined , undefined , undefined , undefined , undefined , false )
@@ -98,58 +100,4 @@ describe('PackageInstallerE2E', () => {
98
100
testLogger . showUser ( outputs )
99
101
} , 60000 )
100
102
} )
101
-
102
- describe ( 'copyGossipKeys' , ( ) => {
103
- it ( 'should succeed to copy legacy pfx gossip keys for node0' , async ( ) => {
104
- const podName = 'network-node0-0'
105
- const nodeId = 'node0'
106
-
107
- // generate pfx keys
108
- const pfxDir = 'test/data/pfx'
109
- await k8 . execContainer ( podName , constants . ROOT_CONTAINER , [ 'bash' , '-c' , `rm -f ${ constants . HEDERA_HAPI_PATH } /data/keys/*` ] )
110
- const fileList = await installer . copyGossipKeys ( 'node0' , pfxDir , [ 'node0' ] , constants . KEY_FORMAT_PFX )
111
-
112
- const destDir = `${ constants . HEDERA_HAPI_PATH } /data/keys`
113
- expect ( fileList . length ) . toBe ( 2 )
114
- expect ( fileList ) . toContain ( `${ destDir } /${ Templates . renderGossipPfxPrivateKeyFile ( nodeId ) } ` )
115
- expect ( fileList ) . toContain ( `${ destDir } /public.pfx` )
116
- } , 60000 )
117
-
118
- it ( 'should succeed to copy pem gossip keys for node0' , async ( ) => {
119
- const podName = 'network-node0-0'
120
-
121
- const pemDir = 'test/data/pem'
122
- await k8 . execContainer ( podName , constants . ROOT_CONTAINER , [ 'bash' , '-c' , `rm -f ${ constants . HEDERA_HAPI_PATH } /data/keys/*` ] )
123
- const fileList = await installer . copyGossipKeys ( 'node0' , pemDir , [ 'node0' ] , constants . KEY_FORMAT_PEM )
124
-
125
- const destDir = `${ constants . HEDERA_HAPI_PATH } /data/keys`
126
- expect ( fileList . length ) . toBe ( 4 )
127
- expect ( fileList ) . toContain ( `${ destDir } /${ Templates . renderGossipPemPrivateKeyFile ( constants . SIGNING_KEY_PREFIX , 'node0' ) } ` )
128
- expect ( fileList ) . toContain ( `${ destDir } /${ Templates . renderGossipPemPrivateKeyFile ( constants . AGREEMENT_KEY_PREFIX , 'node0' ) } ` )
129
-
130
- // public keys
131
- expect ( fileList ) . toContain ( `${ destDir } /${ Templates . renderGossipPemPublicKeyFile ( constants . SIGNING_KEY_PREFIX , 'node0' ) } ` )
132
- expect ( fileList ) . toContain ( `${ destDir } /${ Templates . renderGossipPemPublicKeyFile ( constants . AGREEMENT_KEY_PREFIX , 'node0' ) } ` )
133
- } , 60000 )
134
- } )
135
-
136
- describe ( 'copyTLSKeys' , ( ) => {
137
- it ( 'should succeed to copy TLS keys for node0' , async ( ) => {
138
- const nodeId = 'node0'
139
- const podName = Templates . renderNetworkPodName ( nodeId )
140
- const tmpDir = getTmpDir ( )
141
-
142
- // create mock files
143
- const pemDir = 'test/data/pem'
144
- await k8 . execContainer ( podName , constants . ROOT_CONTAINER , [ 'bash' , '-c' , `rm -f ${ constants . HEDERA_HAPI_PATH } /hedera.*` ] )
145
- const fileList = await installer . copyTLSKeys ( podName , pemDir )
146
-
147
- expect ( fileList . length ) . toBe ( 2 ) // [data , hedera.crt, hedera.key]
148
- expect ( fileList . length ) . toBeGreaterThanOrEqual ( 2 )
149
- expect ( fileList ) . toContain ( `${ constants . HEDERA_HAPI_PATH } /hedera.crt` )
150
- expect ( fileList ) . toContain ( `${ constants . HEDERA_HAPI_PATH } /hedera.key` )
151
-
152
- fs . rmSync ( tmpDir , { recursive : true } )
153
- } , defaultTimeout )
154
- } )
155
103
} )
0 commit comments