diff --git a/tests/algorithm_test.js b/tests/algorithm_test.js index af8c28c7..8f1f2436 100644 --- a/tests/algorithm_test.js +++ b/tests/algorithm_test.js @@ -1061,12 +1061,12 @@ describe('Algorithm Tests', () => { name: alg.name, input: ["FR"] } - //input:[{"action":"env","EnvironmentVariable":"FR"}]} const res = await runAlgorithm(algRun, dev_token); const jobId = res.body.jobId; const result = await getResult(jobId, StatusCodes.OK, dev_token); - expect(result.data[0].result).to.contain("compute.internal"); + const nodes = await getNodes(); + expect(nodes).to.include(result.data[0].result); }).timeout(1000 * 5 * 60); it('algorithm hot workers', async () => { diff --git a/utils/kubeCtl.js b/utils/kubeCtl.js index 828e591f..8b511bb3 100644 --- a/utils/kubeCtl.js +++ b/utils/kubeCtl.js @@ -64,7 +64,7 @@ const deletePod = async (podName, namespace = 'default') => { const getNodes = async (namespace = 'default') => { const res = await client.api.v1.nodes.get(); //await client.api.v1.namespaces(namespace).getNodes(); - let nodes = res.body.items.filter(z => z.metadata.labels["kubernetes.io/role"] == "node"); + let nodes = res.body.items.filter(z => z.metadata.labels["node-role.kubernetes.io"] == "node"); return nodes.map((n) => { return n.metadata.name }); }