Assert PVC created name is === input name

pull/273/head
Frostebite 2021-06-19 01:48:41 +01:00
parent 6aecb70e9b
commit b22ed1cd3c
3 changed files with 26 additions and 26 deletions

48
dist/index.js vendored
View File

@ -1513,8 +1513,8 @@ class Kubernetes {
command: [
'bin/bash',
'-c',
`cd /data/builder/action/steps;
chmod +x /return_license.sh;
`cd /data/builder/action/steps;
chmod +x /return_license.sh;
/return_license.sh;`,
],
},
@ -1571,16 +1571,16 @@ class Kubernetes {
yield this.runJob([
'/bin/ash',
'-c',
`apk update;
apk add git-lfs;
ls /credentials/
export GITHUB_TOKEN=$(cat /credentials/GITHUB_TOKEN);
cd /data;
git clone https://github.com/${process.env.GITHUB_REPOSITORY}.git repo;
git clone https://github.com/webbertakken/unity-builder.git builder;
cd repo;
git checkout $GITHUB_SHA;
ls
`apk update;
apk add git-lfs;
ls /credentials/
export GITHUB_TOKEN=$(cat /credentials/GITHUB_TOKEN);
cd /data;
git clone https://github.com/${process.env.GITHUB_REPOSITORY}.git repo;
git clone https://github.com/webbertakken/unity-builder.git builder;
cd repo;
git checkout $GITHUB_SHA;
ls
echo "end"`,
], 'alpine/git');
});
@ -1590,17 +1590,17 @@ class Kubernetes {
yield this.runJob([
'bin/bash',
'-c',
`ls
for f in ./credentials/*; do export $(basename $f)="$(cat $f)"; done
ls /data
ls /data/builder
ls /data/builder/dist
cp -r /data/builder/dist/default-build-script /UnityBuilderAction
cp -r /data/builder/dist/entrypoint.sh /entrypoint.sh
cp -r /data/builder/dist/steps /steps
chmod -R +x /entrypoint.sh
chmod -R +x /steps
/entrypoint.sh
`ls
for f in ./credentials/*; do export $(basename $f)="$(cat $f)"; done
ls /data
ls /data/builder
ls /data/builder/dist
cp -r /data/builder/dist/default-build-script /UnityBuilderAction
cp -r /data/builder/dist/entrypoint.sh /entrypoint.sh
cp -r /data/builder/dist/steps /steps
chmod -R +x /entrypoint.sh
chmod -R +x /steps
/entrypoint.sh
`,
], this.baseImage.toString());
});
@ -1761,7 +1761,7 @@ class KubernetesStorage {
};
const result = yield kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
core.info(`Persistent Volume Claim ${(_a = result.body.metadata) === null || _a === void 0 ? void 0 : _a.name} created`);
assert_1.strict(((_b = result.body.metadata) === null || _b === void 0 ? void 0 : _b.name) === pvcName, 'pvc name matches input');
assert_1.strict.strictEqual((_b = result.body.metadata) === null || _b === void 0 ? void 0 : _b.name, pvcName, 'pvc name matches input');
});
}
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -43,7 +43,7 @@ class KubernetesStorage {
};
const result = await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
core.info(`Persistent Volume Claim ${result.body.metadata?.name} created`);
assert(result.body.metadata?.name === pvcName, 'pvc name matches input');
assert.strictEqual(result.body.metadata?.name, pvcName, 'pvc name matches input');
}
}