added 5 more unit tests

This commit is contained in:
Atharva Mulmuley
2021-06-03 22:24:55 +05:30
parent a0d0dab6ce
commit 2109830fcc
5 changed files with 1204 additions and 1269 deletions

View File

@ -8,7 +8,7 @@ var azPath: string;
const kubeconfig_timeout = 120;//timeout in seconds
export async function getArcKubeconfig() {
export async function getArcKubeconfig(): Promise<string> {
try {
let method = core.getInput('method');
if (method != 'service-account' && method != 'service-principal'){
@ -59,8 +59,8 @@ export async function getArcKubeconfig() {
fs.chmodSync(kubeconfigPath, '600');
core.exportVariable('KUBECONFIG', kubeconfigPath);
console.log('KUBECONFIG environment variable is set');
} catch (error) {
throw new Error(error);
} catch (ex) {
return Promise.reject(ex);
}
}