fix auction tests
This commit is contained in:
parent
65c4c12891
commit
5f92f288c2
@ -1,5 +1,7 @@
|
||||
import {cliTest,createAuthority} from './helper';
|
||||
|
||||
jest.setTimeout(3 * 60 * 1000);
|
||||
|
||||
const args= "auction ";
|
||||
const quantity=25000000
|
||||
const type="aphoton"
|
||||
@ -15,10 +17,14 @@ describe("test auction",() => {
|
||||
});
|
||||
|
||||
it("bid commit",async ()=>{
|
||||
const resp=JSON.parse(cliTest(args+"bid commit "+auctionId+" "+quantity+" "+type));
|
||||
const resp=cliTest(args+"bid commit "+auctionId+" "+quantity+" "+type);
|
||||
expect(resp).toBeDefined;
|
||||
|
||||
filepath = resp.substring(resp.indexOf("./out"))
|
||||
filepath = "."+resp.substring(resp.indexOf("/out/"))
|
||||
});
|
||||
|
||||
it("Wait for reveal phase.", (done) => {
|
||||
setTimeout(done, 60 * 1000);
|
||||
});
|
||||
|
||||
it("bid reveal", async ()=>{
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {cliTest,createBond} from './helper';
|
||||
|
||||
const args= "authority "
|
||||
const name="laconic"
|
||||
|
||||
var bondId: string;
|
||||
var name: string;
|
||||
|
||||
describe("test authority",() => {
|
||||
|
||||
@ -14,7 +14,6 @@ describe("test authority",() => {
|
||||
|
||||
|
||||
it("reserve authority",async ()=>{
|
||||
name="laconic"
|
||||
const resp=cliTest(args+"reserve "+name);
|
||||
expect(resp).toBeDefined;
|
||||
});
|
||||
|
@ -1,9 +1,10 @@
|
||||
import {cliTest,createBond,createRecord} from './helper';
|
||||
|
||||
const args= "name "
|
||||
const args= "name ";
|
||||
const name="laconic-name";
|
||||
const crn=`crn://${name}/app/test`;
|
||||
|
||||
var recordId: string;
|
||||
var name: string;
|
||||
|
||||
describe("test names",() => {
|
||||
|
||||
@ -13,26 +14,32 @@ describe("test names",() => {
|
||||
|
||||
// get record id
|
||||
recordId=createRecord("./test/examples/watcher.yml",bondId)
|
||||
|
||||
// reserve authority
|
||||
cliTest("authority reserve "+name);
|
||||
|
||||
// set authority bond
|
||||
cliTest(args+"bond set "+name+" "+bondId);
|
||||
});
|
||||
|
||||
|
||||
it("set name",async ()=>{
|
||||
const resp=cliTest(args+"set "+name+" "+recordId);
|
||||
const resp=cliTest(args+"set "+crn+" "+recordId);
|
||||
expect(resp).toBeDefined;
|
||||
});
|
||||
|
||||
it("lookup name",async ()=>{
|
||||
const resp=cliTest(args+"lookup "+ name);
|
||||
const resp=cliTest(args+"lookup "+ crn);
|
||||
expect(resp).toBeDefined;
|
||||
});
|
||||
|
||||
it("resolve name",async ()=>{
|
||||
const resp=cliTest(args+"resolve "+name);
|
||||
const resp=cliTest(args+"resolve "+crn);
|
||||
expect(resp).toBeDefined;
|
||||
});
|
||||
|
||||
it("delelte name",async ()=>{
|
||||
const resp=cliTest(args+"delete "+name);
|
||||
const resp=cliTest(args+"delete "+crn);
|
||||
expect(resp).toBeDefined;
|
||||
});
|
||||
});
|
@ -2,9 +2,6 @@ import {cliTest} from './helper';
|
||||
|
||||
const args= "status "
|
||||
|
||||
var recordId: string;
|
||||
var name: string;
|
||||
|
||||
describe("test status",() => {
|
||||
|
||||
it("get status",async ()=>{
|
||||
|
Loading…
Reference in New Issue
Block a user