@@ -44,7 +44,7 @@ describe("VMs", () => {
44
44
// instance = await createEC2Instance(ec2, [
45
45
// "echo 'hello world' > hello.txt",
46
46
// "aws s3 cp hello.txt s3://p0tion-test-bucket/hello.txt"
47
- // ], "t2.micro", amiId, keyName, roleArn)
47
+ // ], "t2.micro", amiId, keyName, roleArn, 8 )
48
48
// expect(instance).to.not.be.undefined
49
49
// // give it time to actually spin up
50
50
// await sleep(250000)
@@ -96,7 +96,7 @@ describe("VMs", () => {
96
96
// "aws s3 cp s3://p0tion-test-bucket/script_test.sh script_test.sh",
97
97
// "chmod +x script_test.sh && bash script_test.sh"
98
98
// ]
99
- // ssmTestInstance = await createEC2Instance(ec2, userData, "t2.small", amiId, keyName, roleArn)
99
+ // ssmTestInstance = await createEC2Instance(ec2, userData, "t2.small", amiId, keyName, roleArn, 8 )
100
100
// await sleep(250000)
101
101
// })
102
102
// it("should run my commands", async () => {
@@ -191,7 +191,6 @@ describe("VMs", () => {
191
191
192
192
// 1 create a bucket for the ceremony
193
193
await signInWithEmailAndPassword ( userAuth , users [ 1 ] . data . email , passwords [ 1 ] )
194
- console . log ( "LOGGED IN" )
195
194
await createS3Bucket ( userFunctions , ceremonyBucket )
196
195
197
196
// zkey upload
@@ -201,20 +200,22 @@ describe("VMs", () => {
201
200
} )
202
201
203
202
afterAll ( async ( ) => {
204
- for ( const instanceId of instancesToTerminate ) {
205
- await terminateEC2Instance ( ec2 , instanceId )
206
- }
203
+ // for (const instanceId of instancesToTerminate) {
204
+ // await terminateEC2Instance(ec2, instanceId)
205
+ // }
207
206
208
- for ( const objectToDelete of objectsToDelete ) {
209
- await deleteObjectFromS3 ( ceremonyBucket , objectToDelete )
210
- }
211
- await deleteBucket ( ceremonyBucket )
207
+ // for (const objectToDelete of objectsToDelete) {
208
+ // await deleteObjectFromS3(ceremonyBucket, objectToDelete)
209
+ // }
210
+ // await deleteBucket(ceremonyBucket)
212
211
213
212
await cleanUpMockUsers ( adminAuth , adminFirestore , users )
214
- // await cleanUpRecursively(adminFirestore, ceremonyId)
213
+ await cleanUpRecursively ( adminFirestore , ceremonyId )
214
+
215
+ fs . rmdirSync ( `${ outputDirectory } ` , { recursive : true } )
215
216
} )
216
217
217
- it ( "should create a ceremony and two VMs should spin up" , async ( ) => {
218
+ it . only ( "should create a ceremony and two VMs should spin up" , async ( ) => {
218
219
// 1. setup ceremony
219
220
ceremonyId = await setupCeremony ( userFunctions , ceremony . data , ceremony . data . prefix ! , [ circuit . data ] )
220
221
@@ -229,16 +230,14 @@ describe("VMs", () => {
229
230
230
231
for ( const circuit of circuits ) {
231
232
const { vmInstanceId } = circuit . data
232
- // instancesToTerminate.push(vmInstanceId)
233
- // check VM status
234
- const status = await checkEC2Status ( ec2 , vmInstanceId )
235
- expect ( status ) . to . be . eq ( true )
233
+ expect ( vmInstanceId ) . to . not . be . null
234
+ instancesToTerminate . push ( vmInstanceId )
236
235
}
237
236
} )
238
237
239
- it . skip ( "should verify a contribution" , async ( ) => {
240
- // 1. login as user 2
241
- await signInWithEmailAndPassword ( userAuth , users [ 2 ] . data . email , passwords [ 2 ] )
238
+ it ( "should verify a contribution" , async ( ) => {
239
+ // 1. login
240
+ await signInWithEmailAndPassword ( userAuth , users [ 0 ] . data . email , passwords [ 0 ] )
242
241
await sleep ( 500 )
243
242
// 2. get circuits for ceremony
244
243
const circuits = await getCeremonyCircuits ( userFirestore , ceremonyId )
0 commit comments