Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team Service Spec Failure #109

Open
brianghig opened this issue Mar 4, 2021 · 0 comments
Open

Team Service Spec Failure #109

brianghig opened this issue Mar 4, 2021 · 0 comments

Comments

@brianghig
Copy link
Contributor

The teams.service.spec.js is encountering periodic failures on line 341 in the test 'should delete team, if team has no resources' .

The userTeam variable that should not exist is sometimes found as :

AssertionError: expected EmbeddedDocument {
  __parentArray: CoreDocumentArray [ [Circular] ],
  __index: 0,
  $isDocumentArrayElement: true,
  $__: InternalCache {
    strictMode: true,
    selected: undefined,
    shardval: undefined,
    saveError: undefined,
    validationError: undefined,
    adhocPaths: undefined,
    removing: undefined,
    inserting: undefined,
    saving: undefined,
    version: undefined,
    getters: Object {},
    _id: ObjectID {
      _bsontype: 'ObjectID',
      id: Buffer [ 60, 40, ee, 45, 59, 9d, 65, bb, f0, 9f, 94, 0d ]
    },
    populate: undefined,
    populated: undefined,
    wasPopulated: false,
    scope: undefined,
    activePaths: StateMachine {
      paths: Object { role: 'init', _id: 'init' },
      states: Object {
        ignore: Object {},
        default: Object {},
        init: Object { role: true, _id: true },
        modify: Object {},
        require: Object {}
      },
      stateNames: Array [ 'require', 'modify', 'init', 'default', 'ignore' ]
    },
    pathsToScopes: Object {},
    cachedRequired: Object {},
    session: undefined,
    $setCalled: Set {},
    ownerDocument: model {
      $__: InternalCache {
        strictMode: true,
        selected: Object {},
        shardval: undefined,
        saveError: undefined,
        validationError: undefined,
        adhocPaths: undefined,
        removing: undefined,
        inserting: undefined,
        saving: undefined,
        version: undefined,
        getters: Object {},
        _id: ObjectID {
          _bsontype: 'ObjectID',
          id: Buffer [ 60, 40, ee, 45, 59, 9d, 65, bb, f0, 9f, 94, 12 ]
        },
        populate: undefined,
        populated: undefined,
        wasPopulated: false,
        scope: undefined,
        activePaths: StateMachine {
          paths: Object {
            provider: 'init',
            username: 'init',
            email: 'init',
            organization: 'init',
            name: 'init',
            phone: 'init',
            password: 'init',
            canProxy: 'init',
            externalGroups: 'init',
            externalRoles: 'init',
            bypassAccessCheck: 'init',
            messagesAcknowledged: 'init',
            acceptedEua: 'init',
            lastLogin: 'init',
            newFeatureDismissed: 'init',
            _id: 'init',
            providerData: 'init',
            created: 'init',
            alertsViewed: 'init',
            teams: 'init',
            __v: 'init'
          },
          states: Object {
            ignore: Object {},
            default: Object {},
            init: Object {
              _id: true,
              phone: true,
              password: true,
              canProxy: true,
              externalGroups: true,
              externalRoles: true,
              bypassAccessCheck: true,
              messagesAcknowledged: true,
              acceptedEua: true,
              lastLogin: true,
              newFeatureDismissed: true,
              name: true,
              email: true,
              username: true,
              organization: true,
              provider: true,
              providerData: true,
              created: true,
              alertsViewed: true,
              teams: true,
              __v: true
            },
            modify: Object {},
            require: Object {}
          },
          stateNames: Array [ 'require', 'modify', 'init', 'default', 'ignore' ]
        },
        pathsToScopes: Object {},
        cachedRequired: Object {},
        session: undefined,
        $setCalled: Set {},
        ownerDocument: undefined,
        fullPath: undefined,
        emitter: EventEmitter { _events: {}, _eventsCount: 0, _maxListeners: 0 },
        $options: Object { skipId: true, isNew: false, willInit: true, defaults: true }
      },
      isNew: false,
      errors: undefined,
      $locals: Object {},
      $op: null,
      _doc: Object {
        phone: '',
        password: '',
        canProxy: false,
        externalGroups: CoreMongooseArray [],
        externalRoles: CoreMongooseArray [],
        bypassAccessCheck: false,
        messagesAcknowledged: 1969-12-31 19:00:00.000 -0500,
        acceptedEua: null,
        lastLogin: null,
        newFeatureDismissed: null,
        _id: ObjectID {
          _bsontype: 'ObjectID',
          id: Buffer [ 60, 40, ee, 45, 59, 9d, 65, bb, f0, 9f, 94, 12 ]
        },
        name: 'explicit Name',
        email: '[email protected]',
        username: 'explicit_username',
        organization: 'explicit Organization',
        provider: 'proxy-pki',
        providerData: Object { dn: 'explicit', dnLower: 'explicit' },
        created: 2021-03-04 09:27:17.217 -0500,
        alertsViewed: 2021-03-04 09:27:17.217 -0500,
        teams: CoreDocumentArray [ [Circular] ],
        __v: 0
      },
      $init: true
    },
    fullPath: 'teams',
    emitter: EventEmitter {
      _events: { isNew: Function { name: '' }, save: Function { name: '' } },
      _eventsCount: 2,
      _maxListeners: 0
    },
    $options: Object { skipId: true, willInit: true, defaults: true }
  },
  isNew: false,
  errors: undefined,
  $locals: Object {},
  $op: null,
  _doc: Object {
    role: 'member',
    _id: ObjectID {
      _bsontype: 'ObjectID',
      id: Buffer [ 60, 40, ee, 45, 59, 9d, 65, bb, f0, 9f, 94, 0d ]
    }
  },
  $init: true
} to not exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant