func (e *e2e) Update(ctx context.Context) func(*testing.T) {
	if err := ctx.Err(); err != nil {
		return func(t *testing.T) { t.Skip(err) }
	}
	fp := driver.Fingerprint(uuid.New().String())
	return func(t *testing.T) {
		defer e.failed(t)

		e.updateOps = make([]driver.UpdateOperation, 0, e.Updates)
		for _, vs := range e.vulns() {
			ref, err := e.s.UpdateVulnerabilities(ctx, e.updater, fp, vs)
			if err != nil {
				t.Fatalf("failed to perform update: %v", err)
			}

			// attach generated UpdateOperations to test retrieval
			// date can be ignored. add in stack order to compare
			e.updateOps = append(e.updateOps, driver.UpdateOperation{
				Ref:         ref,
				Fingerprint: fp,
				Updater:     e.updater,
			})

			checkInsertedVulns(ctx, t, e.pool, ref, vs)
		}
		t.Log("ok")
	}
}
// Update confirms multiple updates to the vulstore
// do the correct things.
Update confirms multiple updates to the vulstore
do the correct things.
// Update confirms multiple updates to the vulstore // do the correct things .
func (e *e2e) Update(ctx context.Context) func(*testing.T) {
	if err := ctx.Err(); err != nil {
		return func(t *testing.T) { t.Skip(err) }
	}
	fp := driver.Fingerprint(uuid.New().String())
	return func(t *testing.T) {
		defer e.failed(t)
		e.updateOps = make([]driver.UpdateOperation, 0, e.Updates)
		for _, vs := range e.vulns() {
			ref, err := e.s.UpdateVulnerabilities(ctx, e.updater, fp, vs)
			if err != nil {
				t.Fatalf("failed to perform update: %v", err)
			}
			e.updateOps = append(e.updateOps, driver.UpdateOperation{
				Ref:         ref,
				Fingerprint: fp,
				Updater:     e.updater,
			})
			checkInsertedVulns(ctx, t, e.pool, ref, vs)
		}
		t.Log("ok")
	}
}
func ( e * e2e ) Update ( ctx context . Context ) func ( * testing . T ) { if err := ctx . Err ( ) ; err != nil { return func ( t * testing . T ) { t . Skip ( err ) } } fp := driver . Fingerprint ( uuid . New ( ) . String ( ) ) return func ( t * testing . T ) { defer e . failed ( t ) e . updateOps = make ( [ ] driver . UpdateOperation , 0 , e . Updates ) for _ , vs := range e . vulns ( ) { ref , err := e . s . UpdateVulnerabilities ( ctx , e . updater , fp , vs ) if err != nil { t . Fatalf ( " " , err ) } e . updateOps = append ( e . updateOps , driver . UpdateOperation { Ref : ref , Fingerprint : fp , Updater : e . updater , } ) checkInsertedVulns ( ctx , t , e . pool , ref , vs ) } t . Log ( " " ) } }
Update confirms multiple updates to the vulstore
do the correct things.
Update confirms multiple updates to the vulstore do the correct things .
// attach generated UpdateOperations to test retrieval // date can be ignored. add in stack order to compare