File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 11import * as kind from './kind' ;
22import * as eks from './eks' ;
3+ import * as openshift3 from './openshift3' ;
34import * as openshift4 from './openshift4' ;
45
56interface IPlatformSetup {
@@ -42,7 +43,7 @@ const openshift3Setup: IPlatformSetup = {
4243 delete : kind . deleteCluster ,
4344 config : kind . exportKubeConfig ,
4445 clean : kind . clean ,
45- setupTester : kind . setupTester ,
46+ setupTester : openshift3 . setupTester ,
4647} ;
4748
4849const openshift4Setup : IPlatformSetup = {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const clusterName = 'kind';
77
88export async function setupTester ( ) : Promise < void > {
99 const osDistro = platform ( ) ;
10- await download ( osDistro ) ;
10+ await download ( osDistro , 'v0.8.1' ) ;
1111}
1212
1313export async function createCluster ( version : string ) : Promise < void > {
@@ -55,13 +55,13 @@ export async function clean(): Promise<void> {
5555 throw new Error ( 'Not implemented' ) ;
5656}
5757
58- async function download ( osDistro : string ) : Promise < void > {
58+ export async function download ( osDistro : string , kindVersion : string ) : Promise < void > {
5959 try {
6060 accessSync ( resolve ( process . cwd ( ) , 'kind' ) , constants . R_OK ) ;
6161 } catch ( error ) {
62- console . log ( ' Downloading KinD...' ) ;
62+ console . log ( ` Downloading KinD ${ kindVersion } ...` ) ;
6363
64- const url = `https://github.com/kubernetes-sigs/kind/releases/download/v0.8.1 /kind-${ osDistro } -amd64` ;
64+ const url = `https://github.com/kubernetes-sigs/kind/releases/download/${ kindVersion } /kind-${ osDistro } -amd64` ;
6565 await exec ( `curl -Lo ./kind ${ url } ` ) ;
6666 chmodSync ( 'kind' , 0o755 ) ; // rwxr-xr-x
6767
Original file line number Diff line number Diff line change 1+ import { platform } from 'os' ;
2+ import { download } from '../platforms/kind' ;
3+
4+ export async function setupTester ( ) : Promise < void > {
5+ const osDistro = platform ( ) ;
6+ await download ( osDistro , 'v0.7.0' ) ;
7+ }
You can’t perform that action at this time.
0 commit comments