migrations

This commit is contained in:
peter
2020-03-25 23:49:54 +01:00
parent b28f8bc7ce
commit 9ff98d92ae
62 changed files with 711 additions and 483 deletions
+7 -7
View File
@@ -1,8 +1,8 @@
import { Injector } from "../src/backend/Injector/Injector";
import { FrontworkAdmin } from "../src/backend/Admin/Admin";
import { T1, T2, Tiers } from "../src/backend/Types/Items";
import { T2, Tiers } from "../src/backend/Types/Items";
import { RPCSocket } from "rpclibrary";
import { RPCSocket, ConnectedSocket } from "rpclibrary";
import { FrontcraftIfc, Auth, User, FrontcraftFeatureIfc, Raid, Character, Rank, Class, Race, Spec, Signup } from "../src/backend/Types/Types";
import { SpecT } from "../src/backend/Types/PlayerSpecs";
@@ -120,8 +120,8 @@ describe('Frontcraft', () => {
let auth: Auth,
adminUser: User,
server: FrontworkAdmin,
client: RPCSocket & FrontcraftIfc,
adminClient: RPCSocket & FrontcraftFeatureIfc,
client: ConnectedSocket<FrontcraftIfc>,
adminClient: ConnectedSocket<FrontcraftFeatureIfc>,
raids: Raid[] = [],
users: { [username in string]: { account: User, character: Character, auth: Auth, signup?: Signup, item?: string } } = {}
@@ -168,12 +168,12 @@ describe('Frontcraft', () => {
}).then(adminUser => {
client.UserManager.login(adminUser.username, 'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb').then(auth => {
const sock = new RPCSocket(
const sock = new RPCSocket<FrontcraftFeatureIfc>(
auth.port,
"localhost"
)
sock.connect<any>(auth.token.value).then(cli => {
sock.connect(auth.token.value).then(cli => {
adminClient = cli
sock.hook('kick', () => {
console.log("I got kicked");
@@ -240,7 +240,7 @@ describe('Frontcraft', () => {
it('should sign up', (done) => {
Promise.all(Object.values(users).map((user) =>
adminClient.signup.sign(user.auth.token.value, user.character, raids[0], false).catch(done)
adminClient.signup.sign(user.auth.token.value, user.character, raids[0], false, ""+Math.floor(Math.random()*10000)).catch(done)
)).then(x => {
adminClient.signup.getSignups(raids[0]).then(s => {
if (s.length == testAccounts.length) {