# Unable to run \`sls test\` without logging into Serverless

**URL:** <https://forum.serverless.com/t/unable-to-run-sls-test-without-logging-into-serverless/13270>\
**Category:** Serverless Framework\
**Created:** [December 1, 2020, 5:45pm UTC](https://forum.serverless.com/t/unable-to-run-sls-test-without-logging-into-serverless/13270 "2020-12-01T17:45:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![createchange](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@createchange](https://forum.serverless.com/u/createchange)\
**Post date:** [December 1, 2020, 5:45pm UTC](https://forum.serverless.com/t/unable-to-run-sls-test-without-logging-into-serverless/13270/1 "2020-12-01T17:45:16Z")

</div>

Hey there! I am creating a CI/CD pipeline using Gitlab. I have the pipeline consuming AWS secrets from Gitlab environment variables, which allows me to successfully deploy a staging stack. However, when the job in the pipeline reaches `sls test --stage staging` it fails out:

```auto
$ serverless test --stage staging
 
  Type Error ---------------------------------------------
 
  TypeError: Cannot read property 'classes' of undefined
      at module.exports.test (/usr/lib/node_modules/serverless/node_modules/@serverless/enterprise-plugin/lib/test/index.js:12:24)
      at ServerlessEnterprisePlugin.<anonymous> (/usr/lib/node_modules/serverless/node_modules/@serverless/enterprise-plugin/lib/plugin.js:511:17)
      at /usr/lib/node_modules/serverless/lib/classes/PluginManager.js:521:55
      at tryCatcher (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
      at Object.gotValue (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/reduce.js:168:18)
      at Object.gotAccum (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/reduce.js:155:25)
      at Object.tryCatcher (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromiseCtx (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:641:10)
      at _drainQueueStep (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:97:12)
      at _drainQueue (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:461:21)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs: docs.serverless.com
     Bugs: github.com/serverless/serverless/issues
     Issues: forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System: linux
     Node Version: 12.20.0
     Framework Version: 2.13.0
     Plugin Version: 4.1.2
     SDK Version: 2.3.2
     Components Version: 3.4.2

```

The relevant lines in the stack trace are:

```auto
  if (!ctx.sls.enterpriseEnabled) {
    throw new this.sls.classes.Error('Run "serverless" to configure your service for testing.');
  }

```

I was able to configure the server using `serverless` to setup an account, and when developing locally, and this allowed me to run the tests in `serverless.test.yml`. However, this is not desired. I don’t particularly want this project attached to Serverless’ infrastructure.

Please let me know if there is any way that I can perform this task without logging into Serverless. I tried the following:

```auto
# .serverlessrc
{
    "enterpriseDisabled": true
}

```

However this provided me with the same stack trace that I referenced above. Any help that can be provided would be most appreciated!

Thanks!

---

<div class="post-metadata">

**Author:** ![ztc212](https://avatars.discourse-cdn.com/v4/letter/z/5e9695/32.png) [@ztc212](https://forum.serverless.com/u/ztc212)\
**Post date:** [January 16, 2021, 7:01pm UTC](https://forum.serverless.com/t/unable-to-run-sls-test-without-logging-into-serverless/13270/2 "2021-01-16T19:01:19Z")

</div>

I am getting the same error when running `sls test`. I tried the suggestions here: [Disable serverless enterprise wrapper](http://forum.serverless.com/t/disable-serverless-enterprise-wrapper/11432) to no avail. Did you ever find a solution?

---

<div class="post-metadata">

**Author:** ![createchange](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@createchange](https://forum.serverless.com/u/createchange)\
**Post date:** [January 16, 2021, 8:16pm UTC](https://forum.serverless.com/t/unable-to-run-sls-test-without-logging-into-serverless/13270/3 "2021-01-16T20:16:48Z")

</div>

Hi there,

I believe this functionality is now entirely locked behind their enterprise offering. I never did find a solution.
