
This patch adds 'functional' tests that will be run by DSVM gate. A 'cloudsConfig.js' file reads 'clouds.yaml' and converts it to json. 'clouds.yaml' file is searched from the following locations: - current directory - ~/.config/openstack - /etc/openstack The first file found wins. For browser, webpack uses a 'yaml' loader and rewrites 'helper/cloudsConfig.js' requirement to 'json!yaml!clouds.yaml'. A dummy test has been added to demonstrate use of devstack config. Change-Id: I55909862c70a4cbe22b2820e51c2969d68d8154a
24 lines
526 B
JavaScript
24 lines
526 B
JavaScript
import Test from "../../src/index";
|
|
import config from "./helpers/cloudsConfig";
|
|
|
|
describe("Simple functional test", () => {
|
|
|
|
it("should call keystone URL", (done) => {
|
|
const testKeystone = function(response) {
|
|
expect(response.status).toBe(200);
|
|
done();
|
|
};
|
|
|
|
const failTest = function(error) {
|
|
expect(error).toBeUndefined();
|
|
done();
|
|
};
|
|
|
|
const t = new Test();
|
|
t.getUrl(config.clouds.devstack.auth.auth_url + '/v2.0')
|
|
.then(testKeystone)
|
|
.catch(failTest);
|
|
});
|
|
|
|
});
|